|
|
@@ -31,11 +31,11 @@ |
|
|
|
<div class="EC_col_8">
|
|
|
|
<div class="fr mt-26">
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="goprojInfo" v-show="NewProductDailog == true">下一步</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="godistWork" v-show="ProjInfoDialog == true">下一步</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="createProject" v-show="marchWorkDialog == true"
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="createProject" v-show="ProjInfoDialog == true" :disabled="isDisableCreate">创建项目</el-button>
|
|
|
|
<!-- <el-button type="primary" round class="fr width_120" @click="createProject"
|
|
|
|
:disabled="isDisableCreate">创建项目</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="addUser(nowFolderIndex)" v-show="marchWorkerPalDialog == true">分配职员</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="backdistWork" v-show="marchWorkerDialog == true">完成或跳过</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="backdistWork" v-show="marchWorkerDialog == true">完成或跳过</el-button> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
@@ -94,18 +94,21 @@ |
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="yiyun_col-12 fl" v-for="prop in listTempProp" :key="prop.propertyID">
|
|
|
|
<!-- 自定义字段显示并输入 -->
|
|
|
|
<div class="yiyun_col-12 fl" v-for="prop in checkNewProjData.CustomProps" :key="prop.Id">
|
|
|
|
<div class="yiyunlargeItem">
|
|
|
|
<el-form-item :label="prop.propertyName">
|
|
|
|
<el-input v-model="prop.propValue" placeholder="输入" class="labelinputbefore">
|
|
|
|
<el-form-item :label="prop.PropertyName">
|
|
|
|
<el-input v-model="prop.PropValue" placeholder="输入" @input="userDefineInput" class="labelinputbefore" :key="prop.Id">
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_col-12img fl mt-10">
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_col-6">
|
|
|
|
|
|
|
|
<div class="pageImgBox">
|
|
|
|
<img :src="coverSrc | resolveAvator" alt="" />
|
|
|
|
<!-- <file-Uploader
|
|
|
@@ -619,6 +622,19 @@ |
|
|
|
selectTemlateData: "", //新建项目时加载的模板
|
|
|
|
selectTemlateID: "",
|
|
|
|
diaBodyheight: false,
|
|
|
|
checkNewProjData: {
|
|
|
|
"Proj": {
|
|
|
|
"ProjName":"",
|
|
|
|
"CompanyId":"",
|
|
|
|
"Notice":"",
|
|
|
|
"ShowImgUrl":"",
|
|
|
|
"TemplateId":"",
|
|
|
|
"CreateUserId":""
|
|
|
|
},
|
|
|
|
"Node": {},
|
|
|
|
"CustomProps": []
|
|
|
|
},
|
|
|
|
|
|
|
|
newProjData: {
|
|
|
|
"projectData": {
|
|
|
|
"projID": "",
|
|
|
@@ -787,6 +803,12 @@ |
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
/**
|
|
|
|
* 用户自定义字段输入强制刷新 解决无法输入的问题
|
|
|
|
*/
|
|
|
|
userDefineInput: function() {
|
|
|
|
this.$forceUpdate();
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 检测bigbody滚动距离添加样式
|
|
|
|
*/
|
|
|
@@ -911,8 +933,20 @@ |
|
|
|
},
|
|
|
|
"listFolder": [],
|
|
|
|
"listProjProp": [],
|
|
|
|
"userId": "",
|
|
|
|
"userId": ""
|
|
|
|
};
|
|
|
|
thisApp.checkNewProjData = {
|
|
|
|
"Proj": {
|
|
|
|
"ProjName":"",
|
|
|
|
"CompanyId":"",
|
|
|
|
"Notice":"",
|
|
|
|
"ShowImgUrl":"",
|
|
|
|
"TemplateId":"",
|
|
|
|
"CreateUserId":"",
|
|
|
|
},
|
|
|
|
"Node": {},
|
|
|
|
"CustomProps": []
|
|
|
|
},
|
|
|
|
thisApp.$emit("refreshListProj", false);
|
|
|
|
},
|
|
|
|
/*
|
|
|
@@ -920,7 +954,7 @@ |
|
|
|
*/
|
|
|
|
godistWork: function() {
|
|
|
|
this.isAllhide();
|
|
|
|
this.marchWorkDialog = true; //显示分配工作面板
|
|
|
|
// this.marchWorkDialog = true; //显示分配工作面板
|
|
|
|
//
|
|
|
|
// this.newProjData.projectData.listProjManager.push(JSON.parse(sessionStorage.user));
|
|
|
|
|
|
|
@@ -1297,6 +1331,8 @@ |
|
|
|
this.cancelCheck(this.selectedUser[i].userID);
|
|
|
|
}
|
|
|
|
this.getSelectTemplateList(this.selectTemlateID);
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 获取模板列表子节点数据
|
|
|
@@ -1331,23 +1367,6 @@ |
|
|
|
|
|
|
|
setSystemCover: function() {
|
|
|
|
|
|
|
|
|
|
|
|
// this.coverSrc = "static\\img\\faceImg\\face" + this.srcIndex + ".png";
|
|
|
|
// this.newProjData.projectData.showImgUrl = this.srcIndex;
|
|
|
|
// if (this.srcIndex < 9) {
|
|
|
|
// this.srcIndex = this.srcIndex + 1;
|
|
|
|
// } else {
|
|
|
|
// this.srcIndex = 1;
|
|
|
|
// }
|
|
|
|
// setSystemCover: function() {
|
|
|
|
// this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png";
|
|
|
|
// this.newProjData.projectData.showImgUrl = this.srcIndex;
|
|
|
|
// if (this.srcIndex < 9) {
|
|
|
|
// this.srcIndex = this.srcIndex + 1;
|
|
|
|
// } else {
|
|
|
|
// this.srcIndex = 1;
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 设置随机封面
|
|
|
@@ -1447,35 +1466,25 @@ |
|
|
|
* 新建项目
|
|
|
|
*/
|
|
|
|
createProject: function() {
|
|
|
|
// this.isAllhide();
|
|
|
|
this.isDisableCreate = true;
|
|
|
|
this.newProjData.userId = sessionStorage.userId;
|
|
|
|
this.newProjData.projectData.templateID = this.selectTemlateID;
|
|
|
|
var thisApp = this;
|
|
|
|
if (thisApp.uploadCoverTimes > 1) {
|
|
|
|
var parm = {
|
|
|
|
ListFilePath: thisApp.arryUnUseCover
|
|
|
|
};
|
|
|
|
this.$axios({
|
|
|
|
method: 'post',
|
|
|
|
url: encodeURI(process.env.API_HOST + 'webupload/files/clear'),
|
|
|
|
data: parm,
|
|
|
|
})
|
|
|
|
.then(response => {})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
thisApp.newProjData.listProjProp = thisApp.listTempProp;
|
|
|
|
this.$axios({
|
|
|
|
method: 'post',
|
|
|
|
url: encodeURI(process.env.API_HOST + 'projects'),
|
|
|
|
data: thisApp.newProjData,
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
|
|
|
|
|
|
|
|
this.checkNewProjData.Proj.ProjName = this.newProjData.projectData.projName;
|
|
|
|
this.checkNewProjData.Proj.CompanyId = this.$store.state.currentCompanyId;
|
|
|
|
this.checkNewProjData.Proj.ShowImgUrl = String(this.newProjData.projectData.showImgUrl);
|
|
|
|
this.checkNewProjData.Proj.TemplateId = this.selectTemlateID;
|
|
|
|
this.checkNewProjData.Proj.CreateUserId = sessionStorage.userId;
|
|
|
|
|
|
|
|
this.$fetchApi('project/CreateProject', JSON.stringify(this.checkNewProjData)).then(res => {
|
|
|
|
console.log(res);
|
|
|
|
if(res.Code === 0) {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: response.data.message,
|
|
|
|
message: "项目创建成功",
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500,
|
|
|
@@ -1483,19 +1492,22 @@ |
|
|
|
thisApp.reSetDialog();
|
|
|
|
thisApp.isDisableCreate = false;
|
|
|
|
thisApp.coverSrc = 'static\\img\\faceImg\\face01.png';
|
|
|
|
} else {
|
|
|
|
let timer = setTimeout(() => {
|
|
|
|
this.$emit('createProjSuccess');
|
|
|
|
clearTimeout(timer);
|
|
|
|
},3000)
|
|
|
|
} else {
|
|
|
|
thisApp.$notify.error({
|
|
|
|
title: '温馨提示',
|
|
|
|
message: response.data.message,
|
|
|
|
message: res.Msg,
|
|
|
|
offset: 100,
|
|
|
|
duration: 5000,
|
|
|
|
});
|
|
|
|
thisApp.isDisableCreate = false;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}).catch(err => console.log(err));
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 获取全部的Dept数据
|
|
|
@@ -1544,20 +1556,20 @@ |
|
|
|
/**
|
|
|
|
* 获取模板属性字段
|
|
|
|
*/
|
|
|
|
listTempPropLoad: function() {
|
|
|
|
var templateId = this.newProjData.projectData.templateID;
|
|
|
|
var thisApp = this;
|
|
|
|
this.$axios({
|
|
|
|
method: 'get',
|
|
|
|
url: encodeURI(process.env.API_HOST + "templates/templateproperty/" + templateId)
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
thisApp.listTempProp = response.data;
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// listTempPropLoad: function() {
|
|
|
|
// var templateId = this.newProjData.projectData.templateID;
|
|
|
|
// var thisApp = this;
|
|
|
|
// this.$axios({
|
|
|
|
// method: 'get',
|
|
|
|
// url: encodeURI(process.env.API_HOST + "templates/templateproperty/" + templateId)
|
|
|
|
// })
|
|
|
|
// .then(response => {
|
|
|
|
// thisApp.listTempProp = response.data;
|
|
|
|
// })
|
|
|
|
// .catch(error => {
|
|
|
|
// console.log(error);
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
/*
|
|
|
|
*进入项目概况
|
|
|
|
*/
|
|
|
@@ -1584,7 +1596,26 @@ |
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.listTempPropLoad(); // 获取模板属性字段
|
|
|
|
// this.listTempPropLoad();
|
|
|
|
// 获取模板属性字段
|
|
|
|
console.log(this.selectTemlateID);
|
|
|
|
let request1 = templateService.queryTemplateNodeByTemplateId(this.selectTemlateID);
|
|
|
|
let request2 = templateService.queryTemplateById(this.selectTemlateID);
|
|
|
|
Promise.all([request1,request2]).then(res => {
|
|
|
|
//res[0] 是模板下面的节点的信息
|
|
|
|
this.checkNewProjData.Node = res[0].Data;
|
|
|
|
//res[1] 是获取自定义字段的信息
|
|
|
|
res[1].Data.propertys.forEach((item, index) => {
|
|
|
|
this.checkNewProjData.CustomProps[index] = {};
|
|
|
|
this.checkNewProjData.CustomProps[index]['TempPropId'] = item.Id;
|
|
|
|
this.checkNewProjData.CustomProps[index]['PropertyName'] = item.PropertyName;
|
|
|
|
this.checkNewProjData.CustomProps[index]['PropValue'] = "";
|
|
|
|
let temp = this.checkNewProjData.CustomProps;
|
|
|
|
this.checkNewProjData.CustomProps = [...temp];
|
|
|
|
})
|
|
|
|
this.checkNewProjData = [...this.checkNewProjData];
|
|
|
|
})
|
|
|
|
|
|
|
|
this.isAllhide();
|
|
|
|
this.setSystemCoverRandom();
|
|
|
|
this.ProjInfoDialog = true; //隐藏新建项目面板
|
|
|
|