库管员页面
This commit is contained in:
		
							parent
							
								
									cf304ce8ee
								
							
						
					
					
						commit
						43bf81c75f
					
				| 
						 | 
					@ -144,11 +144,11 @@ export function getUnitPerson(unitId) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 往来单位-人员配置-左侧人员
 | 
					// 往来单位-人员配置-左侧人员
 | 
				
			||||||
export function getUserList(query) {
 | 
					export function getUserList(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
    url: '/system/user/deptUserTree',
 | 
					    url: '/system/user/deptUserTree',
 | 
				
			||||||
    method: 'get',
 | 
					    method: 'post',
 | 
				
			||||||
    params: query
 | 
					    data: data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -794,22 +794,6 @@ export default {
 | 
				
			||||||
        getTreeData() {
 | 
					        getTreeData() {
 | 
				
			||||||
            getMaTypeList().then((response) => {
 | 
					            getMaTypeList().then((response) => {
 | 
				
			||||||
                this.treeOptions = response.data
 | 
					                this.treeOptions = response.data
 | 
				
			||||||
            //     if(response.data!=null){
 | 
					 | 
				
			||||||
            //         const firstTree = response.data[0];
 | 
					 | 
				
			||||||
            //         for(let i = 1;i<response.data.length;i++){
 | 
					 | 
				
			||||||
            //             firstTree.children.push(...response.data[i].children)
 | 
					 | 
				
			||||||
            //         }
 | 
					 | 
				
			||||||
            //          this.treeOptions = [firstTree]
 | 
					 | 
				
			||||||
            //     // this.treeTempTwo[0] = response.data[0]
 | 
					 | 
				
			||||||
            //     // this.treeTempTwo[0].children[0]=response.data[0].children
 | 
					 | 
				
			||||||
            //     // console.log('treeTempTwo',this.treeTempTwo)
 | 
					 | 
				
			||||||
            //     // for(let i=1;i<response.data.length;i++){
 | 
					 | 
				
			||||||
            //     // this.treeTempTwo[0].children.push(response.data[i].children)
 | 
					 | 
				
			||||||
            //     // }
 | 
					 | 
				
			||||||
            //     // console.log('treeTempTwo',this.treeTempTwo)
 | 
					 | 
				
			||||||
            //     //  this.treeOptions = this.treeTempTwo
 | 
					 | 
				
			||||||
            //     }
 | 
					 | 
				
			||||||
            //    console.log('treeOptions',this.treeOptions)
 | 
					 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        /** 查询列表 */
 | 
					        /** 查询列表 */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,11 +3,11 @@
 | 
				
			||||||
  <div class="app-container" id="toolsType">
 | 
					  <div class="app-container" id="toolsType">
 | 
				
			||||||
    <el-row :gutter="20">
 | 
					    <el-row :gutter="20">
 | 
				
			||||||
      <!--树数据-->
 | 
					      <!--树数据-->
 | 
				
			||||||
      <el-col :span="5" :xs="24">
 | 
					      <el-col :span="4" :xs="24">
 | 
				
			||||||
        <div class="head-container">
 | 
					        <div class="head-container">
 | 
				
			||||||
          <el-input
 | 
					          <el-input
 | 
				
			||||||
            v-model="typeName"
 | 
					            v-model="peopleName"
 | 
				
			||||||
            placeholder="请输入类型名称"
 | 
					            placeholder="请输入人员名称"
 | 
				
			||||||
            clearable
 | 
					            clearable
 | 
				
			||||||
            maxlength="50"
 | 
					            maxlength="50"
 | 
				
			||||||
            size="small"
 | 
					            size="small"
 | 
				
			||||||
| 
						 | 
					@ -32,8 +32,37 @@
 | 
				
			||||||
          </el-tree>
 | 
					          </el-tree>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
 | 
					      <!--树数据-->
 | 
				
			||||||
 | 
					      <el-col :span="4" :xs="24">
 | 
				
			||||||
 | 
					        <div class="head-container">
 | 
				
			||||||
 | 
					          <el-input
 | 
				
			||||||
 | 
					            v-model="typeName"
 | 
				
			||||||
 | 
					            placeholder="请输入类型名称"
 | 
				
			||||||
 | 
					            clearable
 | 
				
			||||||
 | 
					            maxlength="50"
 | 
				
			||||||
 | 
					            size="small"
 | 
				
			||||||
 | 
					            prefix-icon="el-icon-search"
 | 
				
			||||||
 | 
					            style="margin-bottom: 20px"
 | 
				
			||||||
 | 
					          />
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <div class="head-container" style>
 | 
				
			||||||
 | 
					          <el-tree
 | 
				
			||||||
 | 
					            style="height: 700px; overflow: scroll"
 | 
				
			||||||
 | 
					            :data="treeOptionsTwo"
 | 
				
			||||||
 | 
					            :props="defaultPropsTwo"
 | 
				
			||||||
 | 
					            :expand-on-click-node="false"
 | 
				
			||||||
 | 
					            :filter-node-method="filterNodeTwo"
 | 
				
			||||||
 | 
					            ref="treeTwo"
 | 
				
			||||||
 | 
					            node-key="id"
 | 
				
			||||||
 | 
					            default-expand-all
 | 
				
			||||||
 | 
					            highlight-current
 | 
				
			||||||
 | 
					            @node-click="handleNodeClickTwo"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					          </el-tree>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
      <!--用户数据-->
 | 
					      <!--用户数据-->
 | 
				
			||||||
      <el-col :span="19" :xs="24">
 | 
					      <el-col :span="16" :xs="24">
 | 
				
			||||||
        <el-form
 | 
					        <el-form
 | 
				
			||||||
          :model="queryParams"
 | 
					          :model="queryParams"
 | 
				
			||||||
          ref="queryForm"
 | 
					          ref="queryForm"
 | 
				
			||||||
| 
						 | 
					@ -42,9 +71,9 @@
 | 
				
			||||||
          v-show="showSearch"
 | 
					          v-show="showSearch"
 | 
				
			||||||
          label-width="68px"
 | 
					          label-width="68px"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          <el-form-item label="关键字" prop="typeName">
 | 
					          <el-form-item label="关键字" prop="keyword">
 | 
				
			||||||
            <el-input
 | 
					            <el-input
 | 
				
			||||||
              v-model="queryParams.typeName"
 | 
					              v-model="queryParams.keyword"
 | 
				
			||||||
              placeholder="请输入关键字"
 | 
					              placeholder="请输入关键字"
 | 
				
			||||||
              clearable
 | 
					              clearable
 | 
				
			||||||
              style="width: 240px"
 | 
					              style="width: 240px"
 | 
				
			||||||
| 
						 | 
					@ -135,38 +164,30 @@
 | 
				
			||||||
            label="施工类型"
 | 
					            label="施工类型"
 | 
				
			||||||
            align="center"
 | 
					            align="center"
 | 
				
			||||||
            show-overflow-tooltip
 | 
					            show-overflow-tooltip
 | 
				
			||||||
 | 
					            prop="itemType"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
            <template slot-scope="scope" >
 | 
					 | 
				
			||||||
              <span v-if="scope.row.level==1" >{{ scope.row.typeName }}</span>
 | 
					 | 
				
			||||||
            </template>
 | 
					 | 
				
			||||||
           </el-table-column>
 | 
					           </el-table-column>
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column
 | 
				
			||||||
            label="物资类型"
 | 
					            label="物资类型"
 | 
				
			||||||
            align="center"
 | 
					            align="center"
 | 
				
			||||||
            show-overflow-tooltip
 | 
					            show-overflow-tooltip
 | 
				
			||||||
            width="100"
 | 
					            width="100"
 | 
				
			||||||
 | 
					            prop="materialType"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
            <template slot-scope="scope" >
 | 
					 | 
				
			||||||
              <span v-if="scope.row.level==2" >{{ scope.row.typeName }}</span>
 | 
					 | 
				
			||||||
            </template>
 | 
					 | 
				
			||||||
           </el-table-column>
 | 
					           </el-table-column>
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column
 | 
				
			||||||
            label="物资名称"
 | 
					            label="物资名称"
 | 
				
			||||||
            align="center"
 | 
					            align="center"
 | 
				
			||||||
            show-overflow-tooltip
 | 
					            show-overflow-tooltip
 | 
				
			||||||
 | 
					            prop="materialName"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
            <template slot-scope="scope" >
 | 
					 | 
				
			||||||
              <span v-if="scope.row.level==3" >{{ scope.row.typeName }}</span>
 | 
					 | 
				
			||||||
            </template>
 | 
					 | 
				
			||||||
           </el-table-column>
 | 
					           </el-table-column>
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column
 | 
				
			||||||
            label="规格型号"
 | 
					            label="规格型号"
 | 
				
			||||||
            align="center"
 | 
					            align="center"
 | 
				
			||||||
            show-overflow-tooltip
 | 
					            show-overflow-tooltip
 | 
				
			||||||
 | 
					            prop="typeName"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
            <template slot-scope="scope" >
 | 
					 | 
				
			||||||
              <span v-if="scope.row.level==4" >{{ scope.row.typeName }}</span>
 | 
					 | 
				
			||||||
            </template>
 | 
					 | 
				
			||||||
           </el-table-column>
 | 
					           </el-table-column>
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column
 | 
				
			||||||
            label="库管员"
 | 
					            label="库管员"
 | 
				
			||||||
| 
						 | 
					@ -209,17 +230,10 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { getUserByRoleList, getMaUserList } from "@/api/system/user";
 | 
					import { getUserByRoleList, getMaUserList } from "@/api/system/user";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  getProLists,
 | 
					 | 
				
			||||||
  getMaTypeList,
 | 
					  getMaTypeList,
 | 
				
			||||||
  getListByMaType,
 | 
					 | 
				
			||||||
  getMaType,
 | 
					 | 
				
			||||||
  queryKeeperDataApi,
 | 
					  queryKeeperDataApi,
 | 
				
			||||||
  queryKeeperProApi,
 | 
					  queryKeeperProApi,
 | 
				
			||||||
  queryKeeperMatApi,
 | 
					  getListByMaType,
 | 
				
			||||||
  queryKeeperNameApi,
 | 
					 | 
				
			||||||
  delMaType,
 | 
					 | 
				
			||||||
  addMaType,
 | 
					 | 
				
			||||||
  updateMaType,
 | 
					 | 
				
			||||||
} from "@/api/ma/base";
 | 
					} from "@/api/ma/base";
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  getMatConfigList,
 | 
					  getMatConfigList,
 | 
				
			||||||
| 
						 | 
					@ -262,8 +276,12 @@ export default {
 | 
				
			||||||
      propList: null,
 | 
					      propList: null,
 | 
				
			||||||
      // 类型名称
 | 
					      // 类型名称
 | 
				
			||||||
      typeName: undefined,
 | 
					      typeName: undefined,
 | 
				
			||||||
 | 
					      // 人员名称
 | 
				
			||||||
 | 
					      peopleName: undefined,
 | 
				
			||||||
      // 树选项
 | 
					      // 树选项
 | 
				
			||||||
      treeOptions: undefined,
 | 
					      treeOptions: undefined,
 | 
				
			||||||
 | 
					      // 树选项
 | 
				
			||||||
 | 
					      treeOptionsTwo: undefined,
 | 
				
			||||||
      //列表数据
 | 
					      //列表数据
 | 
				
			||||||
      typeList: undefined,
 | 
					      typeList: undefined,
 | 
				
			||||||
      // 是否显示弹出层
 | 
					      // 是否显示弹出层
 | 
				
			||||||
| 
						 | 
					@ -287,6 +305,10 @@ export default {
 | 
				
			||||||
        children: "children",
 | 
					        children: "children",
 | 
				
			||||||
        label: "label",
 | 
					        label: "label",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      defaultPropsTwo: {
 | 
				
			||||||
 | 
					        children: "children",
 | 
				
			||||||
 | 
					        label: "label",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      userList:[],
 | 
					      userList:[],
 | 
				
			||||||
      userNoList:[],
 | 
					      userNoList:[],
 | 
				
			||||||
      userIdTemp: -1,
 | 
					      userIdTemp: -1,
 | 
				
			||||||
| 
						 | 
					@ -313,6 +335,10 @@ export default {
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    // 根据名称筛选部门树
 | 
					    // 根据名称筛选部门树
 | 
				
			||||||
    typeName(val) {
 | 
					    typeName(val) {
 | 
				
			||||||
 | 
					      this.$refs.treeTwo.filter(val);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 根据名称筛选人员树
 | 
				
			||||||
 | 
					    peopleName(val) {
 | 
				
			||||||
      this.$refs.tree.filter(val);
 | 
					      this.$refs.tree.filter(val);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					@ -320,6 +346,7 @@ export default {
 | 
				
			||||||
    // this.getInfo()
 | 
					    // this.getInfo()
 | 
				
			||||||
    this.getList();
 | 
					    this.getList();
 | 
				
			||||||
    this.getTreeData();
 | 
					    this.getTreeData();
 | 
				
			||||||
 | 
					    this.getTreeDataTwo();
 | 
				
			||||||
    this.getKeeperDataList();
 | 
					    this.getKeeperDataList();
 | 
				
			||||||
    // this.getUserList()
 | 
					    // this.getUserList()
 | 
				
			||||||
    // this.getPropData()
 | 
					    // this.getPropData()
 | 
				
			||||||
| 
						 | 
					@ -334,7 +361,7 @@ export default {
 | 
				
			||||||
      renderConent(h, { node }) {
 | 
					      renderConent(h, { node }) {
 | 
				
			||||||
      let iconClass = '';
 | 
					      let iconClass = '';
 | 
				
			||||||
      // 根据 node 的类型判断图标
 | 
					      // 根据 node 的类型判断图标
 | 
				
			||||||
      if (node.data.level == 3) {
 | 
					      if (node.data.level == 99) {
 | 
				
			||||||
        iconClass = 'el-icon-user-solid';
 | 
					        iconClass = 'el-icon-user-solid';
 | 
				
			||||||
      } 
 | 
					      } 
 | 
				
			||||||
      // else if (node.type === 'file') {
 | 
					      // else if (node.type === 'file') {
 | 
				
			||||||
| 
						 | 
					@ -392,18 +419,25 @@ export default {
 | 
				
			||||||
      // getMatConfigList().then((response) => {
 | 
					      // getMatConfigList().then((response) => {
 | 
				
			||||||
      //   this.treeOptions = response.data;
 | 
					      //   this.treeOptions = response.data;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      getUserList({ userName: this.userName ,deptId:0}).then(response => {
 | 
					      const roleIds = [7,14];
 | 
				
			||||||
 | 
					      getUserList({ roleIds: roleIds}).then(response => {
 | 
				
			||||||
        this.treeOptions = response.data
 | 
					        this.treeOptions = response.data
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    /** 查询新增页面-上级类型下拉树结构 */
 | 
				
			||||||
 | 
					    getTreeDataTwo() {
 | 
				
			||||||
 | 
					        getMaTypeList().then((response) => {
 | 
				
			||||||
 | 
					            this.treeOptionsTwo = response.data
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    /** 查询列表 */
 | 
					    /** 查询列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					        this.loading = true
 | 
				
			||||||
      getListByMatConfig(this.queryParams).then((response) => {
 | 
					        getListByMaType(this.queryParams).then((response) => {
 | 
				
			||||||
        //  this.total = response.total;
 | 
					            this.typeList = response.data.rows
 | 
				
			||||||
        this.typeList = this.handleTree(response.data, "typeId");
 | 
					            this.total = response.data.total
 | 
				
			||||||
        this.loading = false;
 | 
					            this.loading = false
 | 
				
			||||||
      });
 | 
					        })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 筛选节点 - 左侧树
 | 
					    // 筛选节点 - 左侧树
 | 
				
			||||||
    filterNode(value, data) {
 | 
					    filterNode(value, data) {
 | 
				
			||||||
| 
						 | 
					@ -413,10 +447,21 @@ export default {
 | 
				
			||||||
    // 节点单击事件 - 左侧树
 | 
					    // 节点单击事件 - 左侧树
 | 
				
			||||||
    handleNodeClick(data, node) {
 | 
					    handleNodeClick(data, node) {
 | 
				
			||||||
      // this.queryParams.level = data.level
 | 
					      // this.queryParams.level = data.level
 | 
				
			||||||
      this.handleQuery();
 | 
					      // this.handleQuery();
 | 
				
			||||||
      this.$refs.multipleTable.clearSelection();
 | 
					      this.$refs.multipleTable.clearSelection();
 | 
				
			||||||
      (this.userIdTemp = data.id), (this.queryParams.userId = data.id);
 | 
					      (this.userIdTemp = data.id), (this.queryParams.userId = data.id);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 筛选节点 - 左侧树
 | 
				
			||||||
 | 
					    filterNodeTwo(value, data) {
 | 
				
			||||||
 | 
					          if (!value) return true
 | 
				
			||||||
 | 
					          return data.label.indexOf(value) !== -1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      // 节点单击事件 - 左侧树
 | 
				
			||||||
 | 
					    async  handleNodeClickTwo(data,node) {
 | 
				
			||||||
 | 
					          this.queryParams.typeId = data.id
 | 
				
			||||||
 | 
					          this.queryParams.level = data.level
 | 
				
			||||||
 | 
					          this.handleQuery()
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    // 取消按钮
 | 
					    // 取消按钮
 | 
				
			||||||
    cancel() {
 | 
					    cancel() {
 | 
				
			||||||
      this.open = false;
 | 
					      this.open = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue