|
@@ -205,6 +205,15 @@
|
|
|
:clearable="false" type="date"
|
|
|
placeholder="选择日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <!-- 研究中心 -->
|
|
|
+ <el-form-item :label="yonghuUser.customDegreeName">
|
|
|
+ <el-select v-model="auseList" multiple placeholder="请选择" filterable="true" style="width: 100%">
|
|
|
+ <span v-for="(item, index) in ause" :key="index">
|
|
|
+ <el-option :label="item.name" :value="item.id"></el-option>
|
|
|
+ </span>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -447,7 +456,9 @@
|
|
|
rules: {
|
|
|
name: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
|
|
|
},
|
|
|
- yonghuUser: []
|
|
|
+ yonghuUser: [],
|
|
|
+ ause: [], // 研究中心总数据
|
|
|
+ auseList: [], // 选中的研究中心
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
@@ -467,6 +478,26 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ yanjiuzx() {
|
|
|
+ this.http.post('/report-extra-degree/getAll ',{},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.ause = res.data
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
userssHu() {
|
|
|
this.http.post('/time-type/getCompanyTimeSetting',{
|
|
|
companyId: this.user.companyId
|
|
@@ -1100,7 +1131,25 @@
|
|
|
if(this.addForm.contractAmount != null) {
|
|
|
formData.append("contractAmount", this.addForm.contractAmount);
|
|
|
}
|
|
|
-
|
|
|
+ var listId = []
|
|
|
+ var listName = []
|
|
|
+ if(this.auseList.length > 0) {
|
|
|
+ for(var l in this.auseList) {
|
|
|
+ for(var o in this.ause) {
|
|
|
+ if(this.auseList[l] == this.ause[o].id) {
|
|
|
+ listId.push(this.ause[o].id)
|
|
|
+ listName.push(this.ause[o].name)
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ listId.toString()
|
|
|
+ listName.toString()
|
|
|
+ console.log(listId, listName)
|
|
|
+ formData.append("associateDegrees", listId)
|
|
|
+ formData.append("associateDegreeNames", listName)
|
|
|
+ // return
|
|
|
this.http.uploadFile(this.port.project.add,formData,
|
|
|
res => {
|
|
|
this.addLoading = false;
|
|
@@ -1155,7 +1204,23 @@
|
|
|
this.addForm.code = this.addForm.projectCode;
|
|
|
this.addForm.name = this.addForm.projectName;
|
|
|
this.addFormVisible = true;
|
|
|
-
|
|
|
+ console.log(this.addForm, 123)
|
|
|
+ var arr = []
|
|
|
+ if(this.addForm.associateDegrees.length > 0) {
|
|
|
+ if(this.addForm.associateDegrees.length == 1) {
|
|
|
+ var sl = +this.addForm.associateDegrees + 0
|
|
|
+ arr.push(sl)
|
|
|
+ } else {
|
|
|
+ var spl = this.addForm.associateDegrees.split(',')
|
|
|
+ for(var i in spl) {
|
|
|
+ var ss = +spl[i] + 0
|
|
|
+ arr.push(ss)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ arr = []
|
|
|
+ }
|
|
|
+ this.auseList = arr
|
|
|
},
|
|
|
showEditPar() {
|
|
|
this.addForm = JSON.parse(JSON.stringify(this.project));
|
|
@@ -1344,6 +1409,7 @@
|
|
|
this.getProjectNotifyUserList(this.curProjectId);
|
|
|
this.getProgressData();
|
|
|
this.userssHu()
|
|
|
+ this.yanjiuzx()
|
|
|
}
|
|
|
};
|
|
|
</script>
|