|
@@ -23,6 +23,9 @@
|
|
placeholder="请选择参与人" @click="clickPicker()" />
|
|
placeholder="请选择参与人" @click="clickPicker()" />
|
|
<van-field readonly clickable v-model="form.inchargerName" label="负责人"
|
|
<van-field readonly clickable v-model="form.inchargerName" label="负责人"
|
|
placeholder="请选择负责人" @click="showPickerIncharger = true" />
|
|
placeholder="请选择负责人" @click="showPickerIncharger = true" />
|
|
|
|
+ <!-- 研究中心 -->
|
|
|
|
+ <van-field readonly clickable name="userNames" v-model="form.associateDegreeNames" label="研究中心"
|
|
|
|
+ placeholder="请选择" @click="clikls()"/>
|
|
</van-form>
|
|
</van-form>
|
|
</van-dialog>
|
|
</van-dialog>
|
|
<van-popup v-model="showPickerUser" position="bottom">
|
|
<van-popup v-model="showPickerUser" position="bottom">
|
|
@@ -35,6 +38,13 @@
|
|
<van-popup v-model="showPickerIncharger" position="bottom">
|
|
<van-popup v-model="showPickerIncharger" position="bottom">
|
|
<van-picker show-toolbar :columns="inchargerUserList" value-key="name" @confirm="choseIncharger" @cancel="showPickerIncharger = false" />
|
|
<van-picker show-toolbar :columns="inchargerUserList" value-key="name" @confirm="choseIncharger" @cancel="showPickerIncharger = false" />
|
|
</van-popup>
|
|
</van-popup>
|
|
|
|
+ <!-- 研究中心 -->
|
|
|
|
+ <van-popup v-model="cliklss" position="bottom">
|
|
|
|
+ <div style="minHeight:300px;">
|
|
|
|
+ <van-checkbox class="userCheckbox" v-for="(item) in ause" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
|
|
|
|
+ <van-button style="width:100%;" @click="refreshParticipatess();cliklss=false">确定</van-button>
|
|
|
|
+ </div>
|
|
|
|
+ </van-popup>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -64,12 +74,24 @@
|
|
form: {
|
|
form: {
|
|
id: null,
|
|
id: null,
|
|
projectName: "",
|
|
projectName: "",
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ cliklss: false,
|
|
|
|
+ ause: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ yanjiuzx() {
|
|
|
|
+ this.$axios.post("/report-extra-degree/getAll", {})
|
|
|
|
+ .then(res => {
|
|
|
|
+ if(res.code == "ok") {
|
|
|
|
+ this.ause = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast.fail('获取失败');
|
|
|
|
+ }
|
|
|
|
+ }).catch(err=> {toast.clear();});
|
|
|
|
+ },
|
|
choseIncharger(value, index) {
|
|
choseIncharger(value, index) {
|
|
this.showPickerIncharger = false;
|
|
this.showPickerIncharger = false;
|
|
this.form.inchargerName = value.name;
|
|
this.form.inchargerName = value.name;
|
|
@@ -98,6 +120,22 @@
|
|
this.form.userNames = this.form.userNames.substring(0, this.form.userNames.length-1);
|
|
this.form.userNames = this.form.userNames.substring(0, this.form.userNames.length-1);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 刷新研究中心
|
|
|
|
+ refreshParticipatess() {
|
|
|
|
+ var auseNme = []
|
|
|
|
+ var auseList = []
|
|
|
|
+ for(var i in this.ause) {
|
|
|
|
+ if(this.ause[i].isChecked) {
|
|
|
|
+ if(this.ause[i].isChecked == true) {
|
|
|
|
+ auseNme.push(this.ause[i].name)
|
|
|
|
+ auseList.push(this.ause[i].id)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.form.associateDegreeNames = auseNme.toString()
|
|
|
|
+ this.form.associateDegrees = auseList
|
|
|
|
+ console.log(this.form, '刷新')
|
|
|
|
+ },
|
|
onChange() {
|
|
onChange() {
|
|
console.log('===');
|
|
console.log('===');
|
|
},
|
|
},
|
|
@@ -107,6 +145,19 @@
|
|
clickPicker() {
|
|
clickPicker() {
|
|
this.showPickerUser = true;
|
|
this.showPickerUser = true;
|
|
},
|
|
},
|
|
|
|
+ clikls() {
|
|
|
|
+ this.cliklss = true
|
|
|
|
+ for(var i in this.ause) {
|
|
|
|
+ if(this.form.associateDegrees.length > 0) {
|
|
|
|
+ for(var j in this.form.associateDegrees) {
|
|
|
|
+ if(this.form.associateDegrees[j] == this.ause[i].id) {
|
|
|
|
+ this.ause[i].isChecked = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(this.ause)
|
|
|
|
+ },
|
|
// 返回
|
|
// 返回
|
|
back() {
|
|
back() {
|
|
history.back();
|
|
history.back();
|
|
@@ -180,18 +231,38 @@
|
|
inchargerName:null,
|
|
inchargerName:null,
|
|
inchargerId:null,
|
|
inchargerId:null,
|
|
userId:null,
|
|
userId:null,
|
|
- userNames:null
|
|
|
|
|
|
+ userNames:null,
|
|
|
|
+ associateDegreeNames: null,
|
|
|
|
+ associateDegrees: null
|
|
}
|
|
}
|
|
// this.userList.forEach(u=>u.isChecked=false);
|
|
// this.userList.forEach(u=>u.isChecked=false);
|
|
// this.refreshParticipate();
|
|
// this.refreshParticipate();
|
|
} else {
|
|
} else {
|
|
this.title = "修改项目";
|
|
this.title = "修改项目";
|
|
|
|
+ var arrs
|
|
|
|
+ if(this.list[i].associateDegrees) {
|
|
|
|
+ arrs = this.list[i].associateDegrees.split(',')
|
|
|
|
+ for(var j in arrs) {
|
|
|
|
+ arrs[j] = +arrs[j] + 0
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ arrs = []
|
|
|
|
+ }
|
|
|
|
+ var name
|
|
|
|
+ if(this.list[i].associateDegreeNames != null && this.list[i].associateDegreeNames != 'null') {
|
|
|
|
+ name = this.list[i].associateDegreeNames
|
|
|
|
+ } else {
|
|
|
|
+ name = ''
|
|
|
|
+ }
|
|
|
|
+ console.log(name, '看看')
|
|
this.form = {
|
|
this.form = {
|
|
id: this.list[i].id,
|
|
id: this.list[i].id,
|
|
projectName: this.list[i].projectName,
|
|
projectName: this.list[i].projectName,
|
|
projectCode: this.list[i].projectCode,
|
|
projectCode: this.list[i].projectCode,
|
|
inchargerId: this.list[i].inchargerId,
|
|
inchargerId: this.list[i].inchargerId,
|
|
inchargerName: this.list[i].inchargerName,
|
|
inchargerName: this.list[i].inchargerName,
|
|
|
|
+ associateDegreeNames: name,
|
|
|
|
+ associateDegrees: arrs
|
|
}
|
|
}
|
|
var part = this.list[i].participator;
|
|
var part = this.list[i].participator;
|
|
|
|
|
|
@@ -230,6 +301,18 @@
|
|
// form.id = this.form.id;
|
|
// form.id = this.form.id;
|
|
formData.append("id", this.form.id);
|
|
formData.append("id", this.form.id);
|
|
}
|
|
}
|
|
|
|
+ if(this.form.associateDegreeNames != '' && this.form.associateDegreeNames != null) {
|
|
|
|
+ formData.append("associateDegreeNames", this.form.associateDegreeNames);
|
|
|
|
+ } else {
|
|
|
|
+ formData.append("associateDegreeNames", null);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(this.form.associateDegrees.length > 0) {
|
|
|
|
+ var sss = this.form.associateDegrees.toString()
|
|
|
|
+ formData.append("associateDegrees", sss);
|
|
|
|
+ } else {
|
|
|
|
+ formData.append("associateDegrees", null);
|
|
|
|
+ }
|
|
const config = {
|
|
const config = {
|
|
headers: {
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data'
|
|
'Content-Type': 'multipart/form-data'
|
|
@@ -243,6 +326,7 @@
|
|
this.list = [];
|
|
this.list = [];
|
|
this.page = 1;
|
|
this.page = 1;
|
|
this.getProject();
|
|
this.getProject();
|
|
|
|
+ this.yanjiuzx()
|
|
} else {
|
|
} else {
|
|
toast.clear();
|
|
toast.clear();
|
|
this.$toast.fail(this.form.id==null?'新增失败':'修改失败');
|
|
this.$toast.fail(this.form.id==null?'新增失败':'修改失败');
|
|
@@ -250,6 +334,7 @@
|
|
}).catch(err=> {toast.clear();});
|
|
}).catch(err=> {toast.clear();});
|
|
} else {
|
|
} else {
|
|
this.show = false;
|
|
this.show = false;
|
|
|
|
+ this.yanjiuzx()
|
|
}
|
|
}
|
|
done();
|
|
done();
|
|
},
|
|
},
|
|
@@ -284,6 +369,7 @@
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
this.getUsers();
|
|
this.getUsers();
|
|
|
|
+ this.yanjiuzx()
|
|
this.canEdit = (this.user.role==1||this.user.role==2||this.user.role==5);
|
|
this.canEdit = (this.user.role==1||this.user.role==2||this.user.role==5);
|
|
}
|
|
}
|
|
};
|
|
};
|