库管员配置
This commit is contained in:
		
							parent
							
								
									6ad52f4107
								
							
						
					
					
						commit
						9d7c389ca1
					
				| 
						 | 
				
			
			@ -12,7 +12,7 @@ export function getMatConfigList(query) {
 | 
			
		|||
//组织人员树类型管理列表
 | 
			
		||||
export function getListByMatConfig(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/material/ma_type/list',
 | 
			
		||||
    url: '/material/ma_type/listNoPage',
 | 
			
		||||
    method: 'get',
 | 
			
		||||
    params: query,
 | 
			
		||||
  })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -509,9 +509,8 @@ export default {
 | 
			
		|||
  methods: {
 | 
			
		||||
      renderConent(h, { node }) {
 | 
			
		||||
      let iconClass = '';
 | 
			
		||||
      console.log('node',node)
 | 
			
		||||
      // 根据 node 的类型判断图标
 | 
			
		||||
      if (node.level == 4) {
 | 
			
		||||
      if (node.data.level == 3) {
 | 
			
		||||
        iconClass = 'el-icon-user-solid';
 | 
			
		||||
      } 
 | 
			
		||||
      // else if (node.type === 'file') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -288,12 +288,11 @@ export default {
 | 
			
		|||
        children: "children",
 | 
			
		||||
        label: "label",
 | 
			
		||||
      },
 | 
			
		||||
      userList:[],
 | 
			
		||||
      userIdTemp: -1,
 | 
			
		||||
      typeIdTemp: -1,
 | 
			
		||||
      // 查询参数
 | 
			
		||||
      queryParams: {
 | 
			
		||||
        pageNum: 1,
 | 
			
		||||
        pageSize: 10,
 | 
			
		||||
        typeName: undefined,
 | 
			
		||||
        level: 0,
 | 
			
		||||
        // phonenumber: undefined,
 | 
			
		||||
| 
						 | 
				
			
			@ -335,7 +334,7 @@ export default {
 | 
			
		|||
      renderConent(h, { node }) {
 | 
			
		||||
      let iconClass = '';
 | 
			
		||||
      // 根据 node 的类型判断图标
 | 
			
		||||
      if (node.level == 4) {
 | 
			
		||||
      if (node.data.level == 3) {
 | 
			
		||||
        iconClass = 'el-icon-user-solid';
 | 
			
		||||
      } 
 | 
			
		||||
      // else if (node.type === 'file') {
 | 
			
		||||
| 
						 | 
				
			
			@ -402,7 +401,7 @@ export default {
 | 
			
		|||
      this.loading = true;
 | 
			
		||||
      getListByMatConfig(this.queryParams).then((response) => {
 | 
			
		||||
        //  this.total = response.total;
 | 
			
		||||
        this.typeList = this.handleTree(response.rows, "typeId");
 | 
			
		||||
        this.typeList = this.handleTree(response.data, "typeId");
 | 
			
		||||
        this.loading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			@ -455,11 +454,17 @@ export default {
 | 
			
		|||
 | 
			
		||||
    // 多选框选中数据
 | 
			
		||||
    handleSelectionChange(selection) {
 | 
			
		||||
      this.userList=[];
 | 
			
		||||
      this.selectionRows = selection,
 | 
			
		||||
      this.ids = selection.map((item) =>item.typeId);
 | 
			
		||||
 | 
			
		||||
      selection.forEach(item=>{
 | 
			
		||||
          this.userList.push({'typeId':item.typeId,'userId':this.userIdTemp})
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      this.single = selection.length != 1;
 | 
			
		||||
      this.multiple = !selection.length;
 | 
			
		||||
      console.log('ids---------',this.ids)
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
    handleSelect(selection, row) {
 | 
			
		||||
      this.toggleSelection(selection, row);
 | 
			
		||||
| 
						 | 
				
			
			@ -535,12 +540,11 @@ export default {
 | 
			
		|||
        } else {
 | 
			
		||||
          const ids = this.ids.join(",");
 | 
			
		||||
        }
 | 
			
		||||
      bindKeeper({
 | 
			
		||||
        typeId: 3,
 | 
			
		||||
        userId: this.userIdTemp,
 | 
			
		||||
      }).then((response) => {
 | 
			
		||||
        console.log('userList',this.userList)
 | 
			
		||||
      bindKeeper(this.userList).then((response) => {
 | 
			
		||||
        this.$modal.msgSuccess("绑定成功");
 | 
			
		||||
        this.ids = null;
 | 
			
		||||
        this.userList = null;
 | 
			
		||||
        this.getTreeData();
 | 
			
		||||
        this.getList();
 | 
			
		||||
        this.$refs.multipleTable.clearSelection();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue