|
@@ -33,7 +33,9 @@
|
|
|
:show-all-levels="false"
|
|
|
filterable
|
|
|
:props="{
|
|
|
- children: 'ResearcherList',
|
|
|
+ value:'ItemId',
|
|
|
+ label:'ItemName',
|
|
|
+ children:'Children',
|
|
|
emitPath: false,
|
|
|
multiple: true
|
|
|
}"
|
|
@@ -63,7 +65,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {roadshowInterence} from '@/api/modules/roadshowApi.js';
|
|
|
+// import {roadshowInterence} from '@/api/modules/roadshowApi.js';
|
|
|
+import { dataAuthInterface } from '@/api/api.js';
|
|
|
import * as supplyApi from '@/api/modules/supplyApi.js';
|
|
|
export default {
|
|
|
props: {
|
|
@@ -89,7 +92,8 @@ export default {
|
|
|
|
|
|
'formData.users': {
|
|
|
handler(nval) {
|
|
|
- this.chooseUsers = this.researcherList.length && nval.map(_ => this.getUserName(_)).filter(_ => _);
|
|
|
+ // this.chooseUsers = this.researcherList.length && nval.map(_ => this.getUserName(_)).filter(_ => _);
|
|
|
+ this.chooseUsers = this.researcherList.length && this.getUserName()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -138,15 +142,21 @@ export default {
|
|
|
},
|
|
|
|
|
|
getUserName(id) {
|
|
|
- let name = '';
|
|
|
- this.researcherList.forEach(item => {
|
|
|
- item.ResearcherList && item.ResearcherList.forEach(item2 => {
|
|
|
- if(item2.AdminId === id) {
|
|
|
- name = item2.RealName || '';
|
|
|
- }
|
|
|
- })
|
|
|
+ let checkedNodes=this.$refs.cascader.getCheckedNodes() || []
|
|
|
+ return checkedNodes.map(item =>{
|
|
|
+ return item.label
|
|
|
})
|
|
|
- return name
|
|
|
+
|
|
|
+ // let name = '';
|
|
|
+ // this.researcherList.forEach(item => {
|
|
|
+ // console.log(item);
|
|
|
+ // item.ResearcherList && item.ResearcherList.forEach(item2 => {
|
|
|
+ // if(item2.ItemId === id) {
|
|
|
+ // name = item2.ItemName || '';
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // return name
|
|
|
},
|
|
|
|
|
|
// 选择的研究员发生改变
|
|
@@ -158,12 +168,20 @@ export default {
|
|
|
|
|
|
/* 获取研究员列表 */
|
|
|
async getResearcherList() {
|
|
|
- const res = await roadshowInterence.getResearcherList();
|
|
|
+ // const res = await roadshowInterence.getResearcherList();
|
|
|
+ // 换成全部系统用户
|
|
|
+ const res = await dataAuthInterface.userSearch();
|
|
|
if (res.Ret !== 200) return
|
|
|
|
|
|
- this.researcherList = this.formatResearcherList(res.Data);
|
|
|
+ // this.researcherList = this.formatResearcherList(res.Data);
|
|
|
+ this.researcherList = res.Data || []
|
|
|
|
|
|
- if(this.form.VarietyId) this.chooseUsers = this.researcherList.length && this.formData.users.map(_ => this.getUserName(_)).filter(_ => _);
|
|
|
+ // if(this.form.VarietyId) this.chooseUsers = this.researcherList.length && this.formData.users.map(_ => this.getUserName(_)).filter(_ => _);
|
|
|
+ if(this.form.VarietyId){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.chooseUsers = this.researcherList.length && this.getUserName()
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 对获取到的研究员列表做处理
|