bug修复
This commit is contained in:
		
							parent
							
								
									938efea6b4
								
							
						
					
					
						commit
						f2a731f9e8
					
				| 
						 | 
					@ -1,280 +1,281 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					    <div class="app-container">
 | 
				
			||||||
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
 | 
					        <el-form
 | 
				
			||||||
      <el-form-item  prop="deviceName">
 | 
					            :model="queryParams"
 | 
				
			||||||
      <el-input
 | 
					            ref="queryForm"
 | 
				
			||||||
          v-model="queryParams.deviceName"
 | 
					            size="small"
 | 
				
			||||||
          placeholder="装备名称"
 | 
					            :inline="true"
 | 
				
			||||||
          clearable
 | 
					            v-show="showSearch"
 | 
				
			||||||
          @keyup.enter.native="handleQuery"
 | 
					            label-width="68px"
 | 
				
			||||||
          maxlength="20"
 | 
					        >
 | 
				
			||||||
 | 
					            <el-form-item prop="deviceName">
 | 
				
			||||||
 | 
					                <el-input
 | 
				
			||||||
 | 
					                    v-model="queryParams.deviceName"
 | 
				
			||||||
 | 
					                    placeholder="装备名称"
 | 
				
			||||||
 | 
					                    clearable
 | 
				
			||||||
 | 
					                    @keyup.enter.native="handleQuery"
 | 
				
			||||||
 | 
					                    maxlength="20"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					            <el-form-item prop="code">
 | 
				
			||||||
 | 
					                <el-input
 | 
				
			||||||
 | 
					                    v-model="queryParams.code"
 | 
				
			||||||
 | 
					                    placeholder="装备编码"
 | 
				
			||||||
 | 
					                    clearable
 | 
				
			||||||
 | 
					                    @keyup.enter.native="handleQuery"
 | 
				
			||||||
 | 
					                    maxlength="20"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <el-form-item prop="deviceTypeList">
 | 
				
			||||||
 | 
					                <el-cascader
 | 
				
			||||||
 | 
					                    v-model="deviceTypeList"
 | 
				
			||||||
 | 
					                    :options="deviceTypeTree"
 | 
				
			||||||
 | 
					                    :props="partTypeTreeProps"
 | 
				
			||||||
 | 
					                    filterable
 | 
				
			||||||
 | 
					                    clearable
 | 
				
			||||||
 | 
					                    style="width: 100%"
 | 
				
			||||||
 | 
					                    placeholder="请选择装备类目"
 | 
				
			||||||
 | 
					                    @change="deviceTypeChange"
 | 
				
			||||||
 | 
					                ></el-cascader>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <el-form-item prop="dateRange">
 | 
				
			||||||
 | 
					                <el-date-picker
 | 
				
			||||||
 | 
					                    style="width: 100%"
 | 
				
			||||||
 | 
					                    v-model="dateRange"
 | 
				
			||||||
 | 
					                    type="daterange"
 | 
				
			||||||
 | 
					                    value-format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					                    range-separator="至"
 | 
				
			||||||
 | 
					                    start-placeholder="更新开始日期"
 | 
				
			||||||
 | 
					                    end-placeholder="更新结束日期"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                </el-date-picker>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
					                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
 | 
				
			||||||
 | 
					                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					        </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-row :gutter="10" class="mb8">
 | 
				
			||||||
 | 
					            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-table v-loading="loading" :data="tableData">
 | 
				
			||||||
 | 
					            <el-table-column label="序号" align="center" width="80" type="index">
 | 
				
			||||||
 | 
					                <template slot-scope="scope">
 | 
				
			||||||
 | 
					                    <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
 | 
				
			||||||
 | 
					                </template>
 | 
				
			||||||
 | 
					            </el-table-column>
 | 
				
			||||||
 | 
					            <el-table-column label="装备名称" align="center" prop="deviceName" sortable />
 | 
				
			||||||
 | 
					            <el-table-column label="装备编码" align="center" prop="code" sortable>
 | 
				
			||||||
 | 
					                <template slot-scope="scope">
 | 
				
			||||||
 | 
					                    <span style="color: blue">{{ scope.row.code }}</span>
 | 
				
			||||||
 | 
					                </template>
 | 
				
			||||||
 | 
					            </el-table-column>
 | 
				
			||||||
 | 
					            <el-table-column label="装备类目" align="center" prop="typeName" width="250px" sortable>
 | 
				
			||||||
 | 
					                <template slot-scope="scope">
 | 
				
			||||||
 | 
					                    <span
 | 
				
			||||||
 | 
					                        >{{ scope.row.firstName }} <span v-show="scope.row.firstName">></span> {{ scope.row.secondName
 | 
				
			||||||
 | 
					                        }}<span v-show="scope.row.secondName">></span>{{ scope.row.thirdName }}</span
 | 
				
			||||||
 | 
					                    >
 | 
				
			||||||
 | 
					                </template>
 | 
				
			||||||
 | 
					            </el-table-column>
 | 
				
			||||||
 | 
					            <el-table-column label="装备型号" align="center" prop="typeName" sortable />
 | 
				
			||||||
 | 
					            <el-table-column label="所属公司" align="center" prop="companyName" sortable />
 | 
				
			||||||
 | 
					            <!-- <el-table-column label="上架时间" align="center" prop="createTime" sortable/> -->
 | 
				
			||||||
 | 
					            <el-table-column label="创建时间" align="center" prop="createTime" sortable />
 | 
				
			||||||
 | 
					            <el-table-column label="更新时间" align="center" prop="updateTime" sortable />
 | 
				
			||||||
 | 
					        </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <pagination
 | 
				
			||||||
 | 
					            v-show="total > 0"
 | 
				
			||||||
 | 
					            :total="total"
 | 
				
			||||||
 | 
					            :page.sync="queryParams.pageNum"
 | 
				
			||||||
 | 
					            :limit.sync="queryParams.pageSize"
 | 
				
			||||||
 | 
					            @pagination="getList"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					    </div>
 | 
				
			||||||
      <el-form-item  prop="code">
 | 
					 | 
				
			||||||
        <el-input
 | 
					 | 
				
			||||||
          v-model="queryParams.code"
 | 
					 | 
				
			||||||
          placeholder="装备编码"
 | 
					 | 
				
			||||||
          clearable
 | 
					 | 
				
			||||||
          @keyup.enter.native="handleQuery"
 | 
					 | 
				
			||||||
          maxlength="20"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </el-form-item>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <el-form-item prop="deviceTypeList">
 | 
					 | 
				
			||||||
          <el-cascader
 | 
					 | 
				
			||||||
              v-model="deviceTypeList"
 | 
					 | 
				
			||||||
              :options="deviceTypeTree"
 | 
					 | 
				
			||||||
              :props="partTypeTreeProps"
 | 
					 | 
				
			||||||
              filterable
 | 
					 | 
				
			||||||
              clearable
 | 
					 | 
				
			||||||
              style="width: 100%"
 | 
					 | 
				
			||||||
              placeholder="请选择装备类目"
 | 
					 | 
				
			||||||
              @change="deviceTypeChange"
 | 
					 | 
				
			||||||
          ></el-cascader>
 | 
					 | 
				
			||||||
      </el-form-item>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <el-form-item prop="dateRange">
 | 
					 | 
				
			||||||
          <el-date-picker
 | 
					 | 
				
			||||||
              style="width: 100%"
 | 
					 | 
				
			||||||
              v-model="dateRange"
 | 
					 | 
				
			||||||
              type="daterange"
 | 
					 | 
				
			||||||
              value-format="yyyy-MM-dd"
 | 
					 | 
				
			||||||
              range-separator="至"
 | 
					 | 
				
			||||||
              start-placeholder="更新开始日期"
 | 
					 | 
				
			||||||
              end-placeholder="更新结束日期"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
          </el-date-picker>
 | 
					 | 
				
			||||||
      </el-form-item>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <el-form-item>
 | 
					 | 
				
			||||||
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
 | 
					 | 
				
			||||||
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
					 | 
				
			||||||
      </el-form-item>
 | 
					 | 
				
			||||||
    </el-form>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					 | 
				
			||||||
    </el-row>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <el-table v-loading="loading" :data="tableData" >
 | 
					 | 
				
			||||||
      <el-table-column label="序号" align="center" width="80" type="index">
 | 
					 | 
				
			||||||
        <template slot-scope="scope">
 | 
					 | 
				
			||||||
          <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
 | 
					 | 
				
			||||||
        </template>
 | 
					 | 
				
			||||||
      </el-table-column>
 | 
					 | 
				
			||||||
      <el-table-column label="装备名称" align="center" prop="deviceName" sortable/>
 | 
					 | 
				
			||||||
      <el-table-column label="装备编码" align="center" prop="code"  sortable>
 | 
					 | 
				
			||||||
          <template slot-scope="scope">
 | 
					 | 
				
			||||||
              <span style="color:blue">{{ scope.row.code}}</span>
 | 
					 | 
				
			||||||
          </template>
 | 
					 | 
				
			||||||
      </el-table-column>
 | 
					 | 
				
			||||||
      <el-table-column label="装备类目" align="center" prop="typeName" width="250px" sortable>
 | 
					 | 
				
			||||||
        <template slot-scope="scope">
 | 
					 | 
				
			||||||
            <span
 | 
					 | 
				
			||||||
                >{{ scope.row.firstName }} <span v-show="scope.row.firstName">></span>
 | 
					 | 
				
			||||||
                {{ scope.row.secondName }}<span v-show="scope.row.secondName">></span
 | 
					 | 
				
			||||||
                >{{ scope.row.thirdName }}</span
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
        </template>
 | 
					 | 
				
			||||||
      </el-table-column>
 | 
					 | 
				
			||||||
      <el-table-column label="装备型号" align="center" prop="typeName" sortable/>
 | 
					 | 
				
			||||||
      <el-table-column label="所属公司" align="center" prop="companyName" sortable/>
 | 
					 | 
				
			||||||
      <el-table-column label="上架时间" align="center" prop="createTime" sortable/>
 | 
					 | 
				
			||||||
      <el-table-column label="更新时间" align="center" prop="updateTime" sortable/>
 | 
					 | 
				
			||||||
    </el-table>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <pagination
 | 
					 | 
				
			||||||
      v-show="total>0"
 | 
					 | 
				
			||||||
      :total="total"
 | 
					 | 
				
			||||||
      :page.sync="queryParams.pageNum"
 | 
					 | 
				
			||||||
      :limit.sync="queryParams.pageSize"
 | 
					 | 
				
			||||||
      @pagination="getList"
 | 
					 | 
				
			||||||
    />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { getEquipmentTypeApi,getEquipmentListApi, } from "@/api/search/equipment";
 | 
					import { getEquipmentTypeApi, getEquipmentListApi } from '@/api/search/equipment'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "equipment",
 | 
					    name: 'equipment',
 | 
				
			||||||
  data() {
 | 
					    data() {
 | 
				
			||||||
    return {
 | 
					        return {
 | 
				
			||||||
      // 遮罩层
 | 
					            // 遮罩层
 | 
				
			||||||
      loading: true,
 | 
					            loading: true,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      loadingTwo: false,
 | 
					            loadingTwo: false,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 是否显示项目部Id
 | 
				
			||||||
 | 
					            showName: false,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // 是否显示项目部Id
 | 
					            // 是否显示施工预警信息
 | 
				
			||||||
      showName: false,
 | 
					            showWarn: false,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // 是否显示施工预警信息
 | 
					            // 选中数组
 | 
				
			||||||
      showWarn: false,
 | 
					            ids: [],
 | 
				
			||||||
 | 
					            // 非单个禁用
 | 
				
			||||||
 | 
					            single: true,
 | 
				
			||||||
 | 
					            // 非多个禁用
 | 
				
			||||||
 | 
					            multiple: true,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // 选中数组
 | 
					            // 显示搜索条件
 | 
				
			||||||
      ids: [],
 | 
					            showSearch: true,
 | 
				
			||||||
      // 非单个禁用
 | 
					            showTeam: false,
 | 
				
			||||||
      single: true,
 | 
					            // 总条数
 | 
				
			||||||
      // 非多个禁用
 | 
					            total: 0,
 | 
				
			||||||
      multiple: true,
 | 
					            totalTwo: 0,
 | 
				
			||||||
 | 
					            // 施工记录表格数据
 | 
				
			||||||
 | 
					            constructionList: [],
 | 
				
			||||||
 | 
					            maxLength: 100, //已选列表上限,防止数据过多请求报错
 | 
				
			||||||
 | 
					            currentSelection: [], //工程已选列表
 | 
				
			||||||
 | 
					            // 班组人员表格数据
 | 
				
			||||||
 | 
					            teamList: [],
 | 
				
			||||||
 | 
					            teamTempList: [],
 | 
				
			||||||
 | 
					            warnList: [],
 | 
				
			||||||
 | 
					            // 弹出层标题
 | 
				
			||||||
 | 
					            title: '',
 | 
				
			||||||
 | 
					            // 是否显示弹出层
 | 
				
			||||||
 | 
					            open: false,
 | 
				
			||||||
 | 
					            // 日期选择器
 | 
				
			||||||
 | 
					            dateRange: [],
 | 
				
			||||||
 | 
					            //装备类型
 | 
				
			||||||
 | 
					            deviceTypeList: [],
 | 
				
			||||||
 | 
					            //装备类型树
 | 
				
			||||||
 | 
					            deviceTypeTree: [],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // 显示搜索条件
 | 
					            //树形结构
 | 
				
			||||||
      showSearch: true,
 | 
					            partTypeTreeProps: {
 | 
				
			||||||
      showTeam: false,
 | 
					                children: 'children',
 | 
				
			||||||
      // 总条数
 | 
					                label: 'name',
 | 
				
			||||||
      total: 0,
 | 
					                multiple: false,
 | 
				
			||||||
      totalTwo : 0,
 | 
					                value: 'id',
 | 
				
			||||||
      // 施工记录表格数据
 | 
					            },
 | 
				
			||||||
      constructionList: [],
 | 
					 | 
				
			||||||
      maxLength:100,//已选列表上限,防止数据过多请求报错
 | 
					 | 
				
			||||||
      currentSelection:[],//工程已选列表
 | 
					 | 
				
			||||||
      // 班组人员表格数据
 | 
					 | 
				
			||||||
      teamList: [],
 | 
					 | 
				
			||||||
      teamTempList: [],
 | 
					 | 
				
			||||||
      warnList: [],
 | 
					 | 
				
			||||||
      // 弹出层标题
 | 
					 | 
				
			||||||
      title: "",
 | 
					 | 
				
			||||||
      // 是否显示弹出层
 | 
					 | 
				
			||||||
      open: false,
 | 
					 | 
				
			||||||
      // 日期选择器
 | 
					 | 
				
			||||||
      dateRange: [],
 | 
					 | 
				
			||||||
      //装备类型
 | 
					 | 
				
			||||||
      deviceTypeList:[],
 | 
					 | 
				
			||||||
      //装备类型树
 | 
					 | 
				
			||||||
      deviceTypeTree:[],
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      //树形结构
 | 
					            // 查询参数
 | 
				
			||||||
      partTypeTreeProps: {
 | 
					            queryParams: {
 | 
				
			||||||
        children: 'children',
 | 
					                pageNum: 1,
 | 
				
			||||||
        label: 'name',
 | 
					                pageSize: 10,
 | 
				
			||||||
        multiple: false,
 | 
					                deviceName: undefined,
 | 
				
			||||||
        value: 'id',
 | 
					                code: undefined,
 | 
				
			||||||
      },
 | 
					                typeId: undefined,
 | 
				
			||||||
 | 
					                startTime: '',
 | 
				
			||||||
 | 
					                endTime: '',
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            //表单数据
 | 
				
			||||||
 | 
					            tableData: [],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // 查询参数
 | 
					            // 查询参数
 | 
				
			||||||
      queryParams: {
 | 
					            queryTeam: {
 | 
				
			||||||
        pageNum: 1,
 | 
					                pageNum: 1,
 | 
				
			||||||
        pageSize: 10,
 | 
					                pageSize: 10,
 | 
				
			||||||
        deviceName: undefined,
 | 
					                name: undefined,
 | 
				
			||||||
        code: undefined,
 | 
					                sex: undefined,
 | 
				
			||||||
        typeId: undefined,
 | 
					                teamId: undefined,
 | 
				
			||||||
        startTime: '',
 | 
					            },
 | 
				
			||||||
        endTime: '',
 | 
					            // 表单参数
 | 
				
			||||||
      },
 | 
					            form: {},
 | 
				
			||||||
      //表单数据
 | 
					 | 
				
			||||||
      tableData: [],
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      // 查询参数
 | 
					 | 
				
			||||||
      queryTeam: {
 | 
					 | 
				
			||||||
          pageNum: 1,
 | 
					 | 
				
			||||||
          pageSize: 10,
 | 
					 | 
				
			||||||
          name: undefined,
 | 
					 | 
				
			||||||
          sex: undefined,
 | 
					 | 
				
			||||||
          teamId: undefined,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      // 表单参数
 | 
					 | 
				
			||||||
      form: {},
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  created() {
 | 
					 | 
				
			||||||
    this.getTypeTreeData();
 | 
					 | 
				
			||||||
    this.getList();
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    /** 查询树形列表 */
 | 
					 | 
				
			||||||
    getTypeTreeData() {
 | 
					 | 
				
			||||||
      getEquipmentTypeApi().then(response => {
 | 
					 | 
				
			||||||
        this.deviceTypeTree = response.data;
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /** 查询装备信息列表 */
 | 
					 | 
				
			||||||
  async getList() {
 | 
					 | 
				
			||||||
      this.loading = true;
 | 
					 | 
				
			||||||
      if(this.dateRange.length > 0){
 | 
					 | 
				
			||||||
        this.queryParams.startTime = this.dateRange[0]
 | 
					 | 
				
			||||||
        this.queryParams.endTime = this.dateRange[1]
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
     await getEquipmentListApi(this.queryParams).then(response => {
 | 
					 | 
				
			||||||
      console.log('11111',response)
 | 
					 | 
				
			||||||
        this.tableData = response.data.rows;
 | 
					 | 
				
			||||||
        this.total = response.data.total;
 | 
					 | 
				
			||||||
        this.loading = false;
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    //打开班组施工页面
 | 
					 | 
				
			||||||
      openTeam(row){
 | 
					 | 
				
			||||||
          this.teamId = row.teamId;
 | 
					 | 
				
			||||||
          this.title = "查看人员"
 | 
					 | 
				
			||||||
          this.showTeam = true;
 | 
					 | 
				
			||||||
          this.getListTeam();
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      //打开临时施工页面
 | 
					 | 
				
			||||||
      openTeamTemp(row){
 | 
					 | 
				
			||||||
          this.teamId = row.teamId;
 | 
					 | 
				
			||||||
          this.title = "查看临时人员"
 | 
					 | 
				
			||||||
          this.showTeamTemp = true;
 | 
					 | 
				
			||||||
          this.getListTeamTemp();
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 取消按钮
 | 
					 | 
				
			||||||
    // cancel() {
 | 
					 | 
				
			||||||
    //   this.open = false;
 | 
					 | 
				
			||||||
    //   this.reset();
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    // 表单重置
 | 
					 | 
				
			||||||
    // reset() {
 | 
					 | 
				
			||||||
    //   this.form = {
 | 
					 | 
				
			||||||
    //     appnum: undefined,
 | 
					 | 
				
			||||||
    //     projectDepartName: undefined,
 | 
					 | 
				
			||||||
    //     projectHeadName: undefined,
 | 
					 | 
				
			||||||
    //     contactInformation: undefined,
 | 
					 | 
				
			||||||
    //     projectHeadName: undefined,
 | 
					 | 
				
			||||||
    //     remarks: undefined
 | 
					 | 
				
			||||||
    //   };
 | 
					 | 
				
			||||||
    //   this.resetForm("form");
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    /** 搜索按钮操作 */
 | 
					 | 
				
			||||||
    handleQuery() {
 | 
					 | 
				
			||||||
      this.queryParams.pageNum = 1;
 | 
					 | 
				
			||||||
      this.getList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					 | 
				
			||||||
    resetQuery() {
 | 
					 | 
				
			||||||
      this.resetForm("queryForm");
 | 
					 | 
				
			||||||
      this.dateRange = [];
 | 
					 | 
				
			||||||
      this.deviceTypeList = []
 | 
					 | 
				
			||||||
      this.queryParams.startTime=''
 | 
					 | 
				
			||||||
      this.queryParams.endTime=''
 | 
					 | 
				
			||||||
      this.queryParams.typeId = ''
 | 
					 | 
				
			||||||
      this.handleQuery();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    //装备类目-change
 | 
					 | 
				
			||||||
    deviceTypeChange(val) {
 | 
					 | 
				
			||||||
        console.log('2222222222',val)
 | 
					 | 
				
			||||||
        if (val.length > 0) {
 | 
					 | 
				
			||||||
            this.queryParams.typeId = val[3]
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            this.queryParams.typeId = ''
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
 | 
					    created() {
 | 
				
			||||||
 | 
					        this.getTypeTreeData()
 | 
				
			||||||
 | 
					        this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    methods: {
 | 
				
			||||||
 | 
					        /** 查询树形列表 */
 | 
				
			||||||
 | 
					        getTypeTreeData() {
 | 
				
			||||||
 | 
					            getEquipmentTypeApi().then((response) => {
 | 
				
			||||||
 | 
					                this.deviceTypeTree = response.data
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					        /** 查询装备信息列表 */
 | 
				
			||||||
};
 | 
					        async getList() {
 | 
				
			||||||
 | 
					            this.loading = true
 | 
				
			||||||
 | 
					            if (this.dateRange.length > 0) {
 | 
				
			||||||
 | 
					                this.queryParams.startTime = this.dateRange[0]
 | 
				
			||||||
 | 
					                this.queryParams.endTime = this.dateRange[1]
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            await getEquipmentListApi(this.queryParams).then((response) => {
 | 
				
			||||||
 | 
					                console.log('11111', response)
 | 
				
			||||||
 | 
					                this.tableData = response.data.rows
 | 
				
			||||||
 | 
					                this.total = response.data.total
 | 
				
			||||||
 | 
					                this.loading = false
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //打开班组施工页面
 | 
				
			||||||
 | 
					        openTeam(row) {
 | 
				
			||||||
 | 
					            this.teamId = row.teamId
 | 
				
			||||||
 | 
					            this.title = '查看人员'
 | 
				
			||||||
 | 
					            this.showTeam = true
 | 
				
			||||||
 | 
					            this.getListTeam()
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //打开临时施工页面
 | 
				
			||||||
 | 
					        openTeamTemp(row) {
 | 
				
			||||||
 | 
					            this.teamId = row.teamId
 | 
				
			||||||
 | 
					            this.title = '查看临时人员'
 | 
				
			||||||
 | 
					            this.showTeamTemp = true
 | 
				
			||||||
 | 
					            this.getListTeamTemp()
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 取消按钮
 | 
				
			||||||
 | 
					        // cancel() {
 | 
				
			||||||
 | 
					        //   this.open = false;
 | 
				
			||||||
 | 
					        //   this.reset();
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        // 表单重置
 | 
				
			||||||
 | 
					        // reset() {
 | 
				
			||||||
 | 
					        //   this.form = {
 | 
				
			||||||
 | 
					        //     appnum: undefined,
 | 
				
			||||||
 | 
					        //     projectDepartName: undefined,
 | 
				
			||||||
 | 
					        //     projectHeadName: undefined,
 | 
				
			||||||
 | 
					        //     contactInformation: undefined,
 | 
				
			||||||
 | 
					        //     projectHeadName: undefined,
 | 
				
			||||||
 | 
					        //     remarks: undefined
 | 
				
			||||||
 | 
					        //   };
 | 
				
			||||||
 | 
					        //   this.resetForm("form");
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        /** 搜索按钮操作 */
 | 
				
			||||||
 | 
					        handleQuery() {
 | 
				
			||||||
 | 
					            this.queryParams.pageNum = 1
 | 
				
			||||||
 | 
					            this.getList()
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        /** 重置按钮操作 */
 | 
				
			||||||
 | 
					        resetQuery() {
 | 
				
			||||||
 | 
					            this.resetForm('queryForm')
 | 
				
			||||||
 | 
					            this.dateRange = []
 | 
				
			||||||
 | 
					            this.deviceTypeList = []
 | 
				
			||||||
 | 
					            this.queryParams.startTime = ''
 | 
				
			||||||
 | 
					            this.queryParams.endTime = ''
 | 
				
			||||||
 | 
					            this.queryParams.typeId = ''
 | 
				
			||||||
 | 
					            this.handleQuery()
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //装备类目-change
 | 
				
			||||||
 | 
					        deviceTypeChange(val) {
 | 
				
			||||||
 | 
					            console.log('2222222222', val)
 | 
				
			||||||
 | 
					            if (val.length > 0) {
 | 
				
			||||||
 | 
					                this.queryParams.typeId = val[3]
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                this.queryParams.typeId = ''
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.uploadImg {
 | 
					.uploadImg {
 | 
				
			||||||
  padding-top: 20px;
 | 
					    padding-top: 20px;
 | 
				
			||||||
  display: flex;
 | 
					    display: flex;
 | 
				
			||||||
  align-items: center;
 | 
					    align-items: center;
 | 
				
			||||||
  justify-content: center;
 | 
					    justify-content: center;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.deviceCode {
 | 
					.deviceCode {
 | 
				
			||||||
    margin-top: 10px;
 | 
					    margin-top: 10px;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue