|
@@ -630,6 +630,50 @@
|
|
<el-input v-model="addForm.bu" :placeholder="$t('subordinateBU')" clearable :disabled="canOnlyModParticipator"></el-input>
|
|
<el-input v-model="addForm.bu" :placeholder="$t('subordinateBU')" clearable :disabled="canOnlyModParticipator"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 用户自己定义的字段 -->
|
|
|
|
+ <div style="margin-top: 20px" v-if="dataList.length > 0">
|
|
|
|
+ <el-form-item v-for="(item, index) in dataList" :key="item.id" :label="item.customName">
|
|
|
|
+ <div v-if="item.customType == 0">
|
|
|
|
+ <el-input v-model="item.value" clearable placeholder="请输入内容" @input="ipts(item.value, index)"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item.customType == 1">
|
|
|
|
+ <el-upload
|
|
|
|
+ list-type="picture-card"
|
|
|
|
+ ref="upload" :file-list="item.value" :action="index" :auto-upload="true" :limit="2" :disabled="item.valuelist.length == '2'" :http-request="fileUpload">
|
|
|
|
+ <i slot="default" class="el-icon-plus"></i>
|
|
|
|
+ <div slot="file" slot-scope="{file}">
|
|
|
|
+ <img
|
|
|
|
+ class="el-upload-list__item-thumbnail"
|
|
|
|
+ :src="file.url" alt=""
|
|
|
|
+ >
|
|
|
|
+ <span class="el-upload-list__item-actions">
|
|
|
|
+ <span
|
|
|
|
+ class="el-upload-list__item-preview"
|
|
|
|
+ @click="handlePictureCardPreview(file)"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-zoom-in"></i>
|
|
|
|
+ </span>
|
|
|
|
+ <span
|
|
|
|
+ v-if="!disabled"
|
|
|
|
+ class="el-upload-list__item-delete"
|
|
|
|
+ @click="handleRemove(file, index)"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-delete"></i>
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item.customType == 2">
|
|
|
|
+ <el-date-picker v-model="item.value" type="date" placeholder="请选择日期" value-format="yyyy-MM-dd"></el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
<!-- <div v-if="user.companyId == '428'">
|
|
<!-- <div v-if="user.companyId == '428'">
|
|
<el-form-item :label="$t('projectgroup')" >
|
|
<el-form-item :label="$t('projectgroup')" >
|
|
<el-input v-model="addForm.projectCategorySub" maxlength="50" show-word-limit :placeholder="$t('peaseenterthe')" clearable></el-input>
|
|
<el-input v-model="addForm.projectCategorySub" maxlength="50" show-word-limit :placeholder="$t('peaseenterthe')" clearable></el-input>
|
|
@@ -749,6 +793,12 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 图片放大弹窗 -->
|
|
|
|
+ <el-dialog :visible.sync="imgUrlListFlg" width="70%" :before-close="xhutDown">
|
|
|
|
+ <img width="100%" :src="imgUrlLists" alt="">
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!--用户详细信息弹出框-->
|
|
<!--用户详细信息弹出框-->
|
|
<el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
|
|
<el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
|
|
<div class="line"><span>{{ $t('lable.name') }}</span>
|
|
<div class="line"><span>{{ $t('lable.name') }}</span>
|
|
@@ -1404,8 +1454,7 @@ a {
|
|
name: '',
|
|
name: '',
|
|
userId: [],
|
|
userId: [],
|
|
level:1,
|
|
level:1,
|
|
- // bu:'',
|
|
|
|
- bu: ['50'],
|
|
|
|
|
|
+ bu:'',
|
|
id: '',
|
|
id: '',
|
|
code: '',
|
|
code: '',
|
|
projectDesc: '',
|
|
projectDesc: '',
|
|
@@ -1504,6 +1553,10 @@ a {
|
|
|
|
|
|
exportDisabled: false,
|
|
exportDisabled: false,
|
|
exportNotification: null,
|
|
exportNotification: null,
|
|
|
|
+ dataList: [],
|
|
|
|
+ dataListBf: [],
|
|
|
|
+ imgUrlLists: '',
|
|
|
|
+ imgUrlListFlg: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 过滤器
|
|
// 过滤器
|
|
@@ -1808,6 +1861,100 @@ a {
|
|
this.getList()
|
|
this.getList()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ fileUpload(file) {
|
|
|
|
+ //首先判断文件类型
|
|
|
|
+ console.log(file)
|
|
|
|
+ let str = file.file.name.split(".");
|
|
|
|
+ let indexLi = file.action
|
|
|
|
+ let format = str[str.length - 1];
|
|
|
|
+ if (format != "jpg" && format != "jpeg" && format != "png") {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "请选择.jpg或.jpeg文件",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ let formData = new FormData();
|
|
|
|
+ formData.append("multipartFile", file.file);
|
|
|
|
+ this.http.uploadFile('/common/uploadFile', formData,
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.dataList[indexLi].valuelist.push(res.data)
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "上传成功",
|
|
|
|
+ type: "success"
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleRemove(file, index) {
|
|
|
|
+ let uploadFiles = this.$refs.upload[0].uploadFiles
|
|
|
|
+ for (var i = 0; i < uploadFiles.length; i++) {
|
|
|
|
+ if (uploadFiles[i]['url'] == file.url) {
|
|
|
|
+ uploadFiles.splice(i, 1)
|
|
|
|
+ this.dataList[index].valuelist.splice(i, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
|
+ console.log(file)
|
|
|
|
+ this.imgUrlLists = file.url;
|
|
|
|
+ this.imgUrlListFlg = true;
|
|
|
|
+ // this.$set(this, 'imgUrlListFlg', true)
|
|
|
|
+ // console.log(this.imgUrlListFlg)
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
|
|
+ xhutDown(done) {
|
|
|
|
+ this.imgUrlListFlg = false
|
|
|
|
+ done()
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
|
|
+ ipts(i, item) {
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
|
|
+ getObtain() {
|
|
|
|
+ this.http.post('/project-custom/getProjectCustom', {},
|
|
|
|
+ res => {
|
|
|
|
+ if(res.code == 'ok') {
|
|
|
|
+ var yaunz = []
|
|
|
|
+ for(var i in res.data) {
|
|
|
|
+ if(res.data[i].customType == '1') {
|
|
|
|
+ this.$set(res.data[i], 'value', [])
|
|
|
|
+ this.$set(res.data[i], 'valuelist', [])
|
|
|
|
+ } else {
|
|
|
|
+ this.$set(res.data[i], 'value', '')
|
|
|
|
+ this.$set(res.data[i], 'valuelist', [])
|
|
|
|
+ }
|
|
|
|
+ yaunz.push(res.data[i])
|
|
|
|
+ }
|
|
|
|
+ this.dataList = yaunz
|
|
|
|
+ this.dataListBf = yaunz
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {;
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
//获取项目列表
|
|
//获取项目列表
|
|
getSupplierList() {
|
|
getSupplierList() {
|
|
this.http.post('/provider-info/list', {
|
|
this.http.post('/provider-info/list', {
|
|
@@ -3677,6 +3824,37 @@ a {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+
|
|
|
|
+ // 处理数据
|
|
|
|
+ chulishuju(data) {
|
|
|
|
+ console.log(data, 12345)
|
|
|
|
+ let arrLists = JSON.parse(JSON.stringify(this.dataListBf))
|
|
|
|
+ var arr = []
|
|
|
|
+ for(var s in arrLists) {
|
|
|
|
+ for(var p in data.plateMap) {
|
|
|
|
+ if(arrLists[s].customName == p && arrLists[s].customType != '1') {
|
|
|
|
+ arrLists[s].value = data.plateMap[p]
|
|
|
|
+ }
|
|
|
|
+ if(arrLists[s].customName == p && arrLists[s].customType == '1' && data.plateMap[p] != null && data.plateMap[p] != ''){
|
|
|
|
+ var sel = data.plateMap[p].split(',')
|
|
|
|
+ var live = []
|
|
|
|
+ for(var dd in sel) {
|
|
|
|
+ var obj = {}
|
|
|
|
+ obj.name = p
|
|
|
|
+ obj.url = this.pictureAddress + '/upload/' + sel[dd]
|
|
|
|
+ live.push(obj)
|
|
|
|
+ }
|
|
|
|
+ console.log('值值hi', this.pictureAddress)
|
|
|
|
+ arrLists[s].value = live
|
|
|
|
+ arrLists[s].valuelist = sel
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.dataList = arrLists
|
|
|
|
+ console.log(this.form, 9999)
|
|
|
|
+ console.log(this.dataList, 8888)
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
+ },
|
|
//显示新增界面
|
|
//显示新增界面
|
|
handleAdd(i, item) {
|
|
handleAdd(i, item) {
|
|
this.canOnlyModParticipator = false;
|
|
this.canOnlyModParticipator = false;
|
|
@@ -3703,6 +3881,10 @@ a {
|
|
manDay:0
|
|
manDay:0
|
|
// deptId: []
|
|
// deptId: []
|
|
}
|
|
}
|
|
|
|
+ for(var i in this.dataList) {
|
|
|
|
+ var str = 'plate' + (+i + 1)
|
|
|
|
+ this.$set(this.addForm,str, '')
|
|
|
|
+ }
|
|
|
|
|
|
if(this.user.timeType.projectWithDept) {
|
|
if(this.user.timeType.projectWithDept) {
|
|
this.$set(this.addForm, 'deptId', [])
|
|
this.$set(this.addForm, 'deptId', [])
|
|
@@ -3736,6 +3918,12 @@ a {
|
|
// console.log(this.projectKeyNodesData, '节点值')
|
|
// console.log(this.projectKeyNodesData, '节点值')
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
|
|
+ this.http.post('/project/detailTwo', {id: item.id},
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.chulishuju(res.data)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
//编辑时,非 (管理全部项目,项目创建人,项目经理),有编辑项目参与人权限的人,可以进行参与人的修改
|
|
//编辑时,非 (管理全部项目,项目创建人,项目经理),有编辑项目参与人权限的人,可以进行参与人的修改
|
|
if (!(this.permissions.projectManagement || this.user.id==item.inchargerId || this.user.id == item.creatorId) && this.permissions.projectParticipator) {
|
|
if (!(this.permissions.projectManagement || this.user.id==item.inchargerId || this.user.id == item.creatorId) && this.permissions.projectParticipator) {
|
|
this.canOnlyModParticipator = true;
|
|
this.canOnlyModParticipator = true;
|
|
@@ -3815,6 +4003,14 @@ a {
|
|
manDay:item.manDay==null?0:item.manDay,
|
|
manDay:item.manDay==null?0:item.manDay,
|
|
manDayDisable:item.manDay
|
|
manDayDisable:item.manDay
|
|
}
|
|
}
|
|
|
|
+ for(var i in this.dataList) {
|
|
|
|
+ var str = 'plate' + (+i + 1)
|
|
|
|
+ if(this.dataList[i].customType != '1') {
|
|
|
|
+ this.$set(this.addForm,str, this.dataList[i].value==null?'':this.dataList[i].value)
|
|
|
|
+ } else {
|
|
|
|
+ this.$set(this.addForm,str,this.dataList[i].valuelist.join('@'))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.contractAmountOld = item.contractAmount ? item.contractAmount : 0
|
|
this.contractAmountOld = item.contractAmount ? item.contractAmount : 0
|
|
// console.log(this.addForm, '数据')
|
|
// console.log(this.addForm, '数据')
|
|
if(this.user.timeType.projectWithDept) {
|
|
if(this.user.timeType.projectWithDept) {
|
|
@@ -4166,7 +4362,14 @@ a {
|
|
if(this.user.timeType.projectManDay){
|
|
if(this.user.timeType.projectManDay){
|
|
formData.append("manDay", this.addForm.manDay ? this.addForm.manDay : '');
|
|
formData.append("manDay", this.addForm.manDay ? this.addForm.manDay : '');
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ for(var i in this.dataList) {
|
|
|
|
+ var str = 'plate' + (+i + 1)
|
|
|
|
+ if(this.dataList[i].customType != '1') {
|
|
|
|
+ formData.append(str,this.dataList[i].value==null?'':this.dataList[i].value);
|
|
|
|
+ } else {
|
|
|
|
+ formData.append(str,this.dataList[i].valuelist.join('@'));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// formData.append("associateDegreeNames", listName)
|
|
// formData.append("associateDegreeNames", listName)
|
|
//console.log("addform",this.addForm);
|
|
//console.log("addform",this.addForm);
|
|
//return
|
|
//return
|
|
@@ -4409,6 +4612,7 @@ a {
|
|
this.getProjectBaseConfigList();
|
|
this.getProjectBaseConfigList();
|
|
this.getClfConfigList()
|
|
this.getClfConfigList()
|
|
this.yanjiuzx()
|
|
this.yanjiuzx()
|
|
|
|
+ this.getObtain()
|
|
|
|
|
|
// 判断是否有供应商字段
|
|
// 判断是否有供应商字段
|
|
if(this.user.company.packageProvider == 1){
|
|
if(this.user.company.packageProvider == 1){
|