|
@@ -85,7 +85,7 @@
|
|
|
<el-link type="primary" :underline="false" @click="projectLevelDialog = true">{{ $t('projectlevelmanagement') }}</el-link>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item v-if="user.timeType.syncFanwei==1||user.timeType.syncSap==1">
|
|
|
- <el-link type="primary" :underline="false" @click="syncProjectForThird()">{{'同步项目信息'}}</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="syncProjectDig=true">{{'同步项目信息'}}</el-link>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item v-if="user.companyId==3385 && permissions.projectClassification">
|
|
|
<el-link type="primary" :underline="false" @click="functionalDivisionDig=true,getFunctionalList()">{{'职能分工设置'}}</el-link>
|
|
@@ -1630,6 +1630,23 @@
|
|
|
<el-button type="primary" @click="batchSetGroupIncharger()">{{ $t('btn.determine') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 项目同步弹窗 -->
|
|
|
+ <el-dialog title="提示" :visible.sync="syncProjectDig" width="600px" :before-close="handleClose">
|
|
|
+ <el-form label-width="100px">
|
|
|
+ <el-form-item :label="'项目编号:'">
|
|
|
+ <el-select filterable collapse-tags clearable v-model="hasChooseProjectCode" multiple placeholder="请选择" style="width:100%">
|
|
|
+ <el-option v-for="item in allProjectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.projectCode">
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
|
|
|
+ <span style="float: left;">{{ item.projectName }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="syncProjectDig = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="syncProjectForThird(hasChooseProjectCode)">开始同步</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<style scoped>
|
|
@@ -1923,7 +1940,10 @@ a {
|
|
|
hasSetGroupInchargerId:null,
|
|
|
hasSetGroupList:[],
|
|
|
addTaskGroupInchargerDig:false,
|
|
|
- filterNodePersonnel: []
|
|
|
+ filterNodePersonnel: [],
|
|
|
+ syncProjectDig:false,
|
|
|
+ allProjectList:[],
|
|
|
+ hasChooseProjectCode:[],
|
|
|
};
|
|
|
},
|
|
|
// 过滤器
|
|
@@ -3952,14 +3972,20 @@ a {
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
|
|
|
- syncProjectForThird(){
|
|
|
+ syncProjectForThird(hasChooseProjectCode){
|
|
|
let url=''
|
|
|
+ let param={}
|
|
|
if(this.user.timeType.syncFanwei==1){
|
|
|
// 美莱德同步项目信息来源泛微
|
|
|
url='/project/syncProjectWithFanwei'
|
|
|
}else if(this.user.timeType.syncSap==1){
|
|
|
// 依斯倍同步项目信息来源SAP
|
|
|
url='/project/syncProjectWithSap'
|
|
|
+ if(hasChooseProjectCode){
|
|
|
+ param={
|
|
|
+ projectCodes:hasChooseProjectCode.toString()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
this.$confirm('确认同步项目数据?','提示',{
|
|
|
confirmButtonText: '确定',
|
|
@@ -3972,7 +3998,7 @@ a {
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
});
|
|
|
- this.http.post(url,{},
|
|
|
+ this.http.post(url,param,
|
|
|
res => {
|
|
|
loading.close();
|
|
|
console.log(res, 'res')
|
|
@@ -3981,6 +4007,7 @@ a {
|
|
|
message: '项目同步成功',
|
|
|
type: "success"
|
|
|
});
|
|
|
+ this.syncProjectDig=false
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -5352,6 +5379,28 @@ a {
|
|
|
jisuanEstimatedWorkTime(manDay){
|
|
|
this.estimatedWorkTime=manDay*this.user.timeType.allday
|
|
|
},
|
|
|
+ getProjectList(){
|
|
|
+ this.http.post(this.port.project.list,{
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ this.listLoading = false;
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.allProjectList=res.data
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
//点击添加
|
|
|
addFunctional(type){
|
|
|
if(type=="functional"){
|
|
@@ -5654,6 +5703,7 @@ a {
|
|
|
this.getClfConfigList()
|
|
|
this.yanjiuzx()
|
|
|
this.getObtain()
|
|
|
+ this.getProjectList()
|
|
|
// this.getRoleList()
|
|
|
|
|
|
// 判断是否有供应商字段
|