|  | @@ -3,7 +3,7 @@
 | 
	
		
			
				|  |  |        <div class="main-search-box">
 | 
	
		
			
				|  |  |            <el-form :model="queryParams" ref="queryForm" size="small"  :inline="true"
 | 
	
		
			
				|  |  |            v-show="showSearch">
 | 
	
		
			
				|  |  | -            <el-form-item label="组织机构" prop="orgId" class="formTreeItem">
 | 
	
		
			
				|  |  | +            <!-- <el-form-item label="组织机构" prop="orgId" class="formTreeItem">
 | 
	
		
			
				|  |  |              <tree-select
 | 
	
		
			
				|  |  |                v-model="queryParams.orgId"
 | 
	
		
			
				|  |  |                :options="deptOptions"
 | 
	
	
		
			
				|  | @@ -16,21 +16,30 @@
 | 
	
		
			
				|  |  |                noOptionsText="没有数据"
 | 
	
		
			
				|  |  |                noResultsText="没有搜索结果"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  | -          </el-form-item>
 | 
	
		
			
				|  |  | +          </el-form-item> -->
 | 
	
		
			
				|  |  | +          <el-form-item label="组织机构">
 | 
	
		
			
				|  |  | +                  <org-tree
 | 
	
		
			
				|  |  | +                    v-model="queryParams.orgId"
 | 
	
		
			
				|  |  | +                    @defaultOrg="getDefaultOrg"
 | 
	
		
			
				|  |  | +                    @checkChange="checkChange"
 | 
	
		
			
				|  |  | +                    @click="clickTreeNode"
 | 
	
		
			
				|  |  | +                  ref="orgTree"
 | 
	
		
			
				|  |  | +                  :showCheckSub="false"
 | 
	
		
			
				|  |  | +                  ></org-tree>
 | 
	
		
			
				|  |  | +              </el-form-item>
 | 
	
		
			
				|  |  | +              
 | 
	
		
			
				|  |  |                <el-form-item label="统计季度" prop="searchTime">
 | 
	
		
			
				|  |  |                  <QuarterPicker format="yyyy年q季度" value-format="yyyy-MM" placeholder="请选择季报基准期" v-model="queryParams.searchTime" />
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |            </el-form>
 | 
	
		
			
				|  |  |            <el-row :gutter="10">
 | 
	
		
			
				|  |  | -            <el-col span="1.5">
 | 
	
		
			
				|  |  | +            <el-col :span="1.5">
 | 
	
		
			
				|  |  |                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
 | 
	
		
			
				|  |  |                <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
	
		
			
				|  |  | -            </el-col>
 | 
	
		
			
				|  |  | -            <el-col :span="1.5">
 | 
	
		
			
				|  |  |                <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport"
 | 
	
		
			
				|  |  | -                         v-hasPermi="['core:resumptionReport:export']">导出数据
 | 
	
		
			
				|  |  | -              </el-button>
 | 
	
		
			
				|  |  | +                         v-hasPermi="['core:resumptionReport:export']">导出数据</el-button>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  |              <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
	
		
			
				|  |  |            </el-row>
 | 
	
		
			
				|  |  |          </div>
 | 
	
	
		
			
				|  | @@ -64,15 +73,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </template>
 | 
	
		
			
				|  |  | -  <!-- <script setup lang="ts">
 | 
	
		
			
				|  |  | -  import { ref } from "vue";
 | 
	
		
			
				|  |  | -  import Quarter from '@/views/core/reportForms/z.vue';
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -  const quarterValue = ref("");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  const disabledQuarter = (val: Date) => {if (val <= new Date()) return false;return true;
 | 
	
		
			
				|  |  | -  };
 | 
	
		
			
				|  |  | -  </script>  -->
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    <script>
 | 
	
		
			
				|  |  |      import tableList from '@/mixins/tableList'
 | 
	
	
		
			
				|  | @@ -80,227 +81,255 @@
 | 
	
		
			
				|  |  |      import treeselect from '@riophae/vue-treeselect'
 | 
	
		
			
				|  |  |      import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 | 
	
		
			
				|  |  |      import {deptTreeSelect,businessTreeSelect} from "@/api/system/public";
 | 
	
		
			
				|  |  | -    import orgTree from "@/components/orgTree";
 | 
	
		
			
				|  |  | +   //import orgTree from "@/components/orgTree";
 | 
	
		
			
				|  |  | +import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
 | 
	
		
			
				|  |  |      import QuarterPicker from '@/views/components/QuarterPicker/index.vue'
 | 
	
		
			
				|  |  | -    export default {
 | 
	
		
			
				|  |  | -      name: "Check",
 | 
	
		
			
				|  |  | -      /** 引入基础minxins*/
 | 
	
		
			
				|  |  | -      mixins: [tableList],
 | 
	
		
			
				|  |  | -      components: {treeselect,orgTree,QuarterPicker },
 | 
	
		
			
				|  |  | -      dicts: ['sys_normal_disable','sys_org_type','repot_cycle'],
 | 
	
		
			
				|  |  | -      data() {
 | 
	
		
			
				|  |  | -        return {
 | 
	
		
			
				|  |  | -            startDatepickerOptions: {
 | 
	
		
			
				|  |  | -        disabledDate(time) {
 | 
	
		
			
				|  |  | -          const date = new Date();
 | 
	
		
			
				|  |  | -          date.setTime(date.getTime());
 | 
	
		
			
				|  |  | -          return time.getTime() < date;
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -          // 遮罩层
 | 
	
		
			
				|  |  | -          loading: true,
 | 
	
		
			
				|  |  | -          // 选中数组
 | 
	
		
			
				|  |  | -          ids: [],
 | 
	
		
			
				|  |  | -          names: [],
 | 
	
		
			
				|  |  | -          // 非单个禁用
 | 
	
		
			
				|  |  | -          single: true,
 | 
	
		
			
				|  |  | -          //搜索tree
 | 
	
		
			
				|  |  | -          deptName: null,
 | 
	
		
			
				|  |  | -          // 非多个禁用
 | 
	
		
			
				|  |  | -          multiple: true,
 | 
	
		
			
				|  |  | -          // 显示搜索条件
 | 
	
		
			
				|  |  | -          showSearch: true,
 | 
	
		
			
				|  |  | -          //区域
 | 
	
		
			
				|  |  | -          roleOptions: [],
 | 
	
		
			
				|  |  | -           //全部检查机构
 | 
	
		
			
				|  |  | -      orgOptions: [],
 | 
	
		
			
				|  |  | -          //搜索tree
 | 
	
		
			
				|  |  | -          deptName: null,
 | 
	
		
			
				|  |  | -          // 部门树选项
 | 
	
		
			
				|  |  | -          deptOptions: [],
 | 
	
		
			
				|  |  | -          // 总条数
 | 
	
		
			
				|  |  | -          total: 0,
 | 
	
		
			
				|  |  | -          //区域集合
 | 
	
		
			
				|  |  | -          areaList: [],
 | 
	
		
			
				|  |  | -          // 区域采集点表格数据
 | 
	
		
			
				|  |  | -          checkList: [],
 | 
	
		
			
				|  |  | -          // 弹出层标题
 | 
	
		
			
				|  |  | -          title: "",
 | 
	
		
			
				|  |  | -          // 是否显示弹出层
 | 
	
		
			
				|  |  | -          open: false,
 | 
	
		
			
				|  |  | -          // 查询参数
 | 
	
		
			
				|  |  | -          queryParams: {
 | 
	
		
			
				|  |  | -            pageNum: 1,
 | 
	
		
			
				|  |  | -            pageSize: 10,
 | 
	
		
			
				|  |  | -            checkName: null,
 | 
	
		
			
				|  |  | -            areaId: null,
 | 
	
		
			
				|  |  | -            orgId: null,
 | 
	
		
			
				|  |  | -            searchTime:new Date()
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          orgName:null,
 | 
	
		
			
				|  |  | -          // 表单参数
 | 
	
		
			
				|  |  | -          form: {},
 | 
	
		
			
				|  |  | -          // 表单校验
 | 
	
		
			
				|  |  | -          checkList: [],
 | 
	
		
			
				|  |  | -          roleOptions: [],
 | 
	
		
			
				|  |  | -          defaultKeys: [],
 | 
	
		
			
				|  |  | -          //是否关联下级
 | 
	
		
			
				|  |  | -          checked: false,
 | 
	
		
			
				|  |  | -          defaultProps: {
 | 
	
		
			
				|  |  | -            children: "children",
 | 
	
		
			
				|  |  | -            label: "name"
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | +export default {
 | 
	
		
			
				|  |  | +  dicts: ['sys_normal_disable','sys_org_type','repot_cycle'],
 | 
	
		
			
				|  |  | +  name: "Check",
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -          rules: {
 | 
	
		
			
				|  |  | -            areaId: [
 | 
	
		
			
				|  |  | -              {required: true, message: '请选择区域', trigger: 'blur'},
 | 
	
		
			
				|  |  | -            ],
 | 
	
		
			
				|  |  | -            orgType: [
 | 
	
		
			
				|  |  | -              {required: true, message: '请选择机构类型', trigger: 'blur'},
 | 
	
		
			
				|  |  | -            ],
 | 
	
		
			
				|  |  | -            checkName: [
 | 
	
		
			
				|  |  | -              {required: true, message: '请输入NFC点位名称', trigger: 'change'}
 | 
	
		
			
				|  |  | -            ],
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          defaultKeys: []
 | 
	
		
			
				|  |  | +  /** 引入基础minxins*/
 | 
	
		
			
				|  |  | +  mixins: [tableList],
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        };
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      created() {
 | 
	
		
			
				|  |  | -        this.getDeptTree();
 | 
	
		
			
				|  |  | -      this. getList();
 | 
	
		
			
				|  |  | +  components: {treeselect,OrgTree,QuarterPicker },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      if (this.defaultValue) {
 | 
	
		
			
				|  |  | -        let value = this.defaultValue
 | 
	
		
			
				|  |  | -        let arr = value.split('-')
 | 
	
		
			
				|  |  | -        this.year = arr[0].slice(0, 4)
 | 
	
		
			
				|  |  | -        let str = arr[0].slice(4, 6) + '-' + arr[1].slice(4, 6)
 | 
	
		
			
				|  |  | -        let arrAll = this.valueArr
 | 
	
		
			
				|  |  | -        this.showValue = `${this.year}年${arrAll.indexOf(str) + 1}季度`
 | 
	
		
			
				|  |  | -      };
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      watch: {
 | 
	
		
			
				|  |  | -        // 根据名称筛选部门树
 | 
	
		
			
				|  |  | -        deptName(val) {
 | 
	
		
			
				|  |  | -          this.$refs.tree.filter(val);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      methods: {
 | 
	
		
			
				|  |  | -        prev () {
 | 
	
		
			
				|  |  | -        this.year = this.year * 1 - 1
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  | +    return {
 | 
	
		
			
				|  |  | +        startDatepickerOptions: {
 | 
	
		
			
				|  |  | +    disabledDate(time) {
 | 
	
		
			
				|  |  | +      const date = new Date();
 | 
	
		
			
				|  |  | +      date.setTime(date.getTime());
 | 
	
		
			
				|  |  | +      return time.getTime() < date;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +      // 遮罩层
 | 
	
		
			
				|  |  | +      loading: true,
 | 
	
		
			
				|  |  | +      // 选中数组
 | 
	
		
			
				|  |  | +      ids: [],
 | 
	
		
			
				|  |  | +      names: [],
 | 
	
		
			
				|  |  | +      // 非单个禁用
 | 
	
		
			
				|  |  | +      single: true,
 | 
	
		
			
				|  |  | +      //搜索tree
 | 
	
		
			
				|  |  | +      deptName: null,
 | 
	
		
			
				|  |  | +      // 非多个禁用
 | 
	
		
			
				|  |  | +      multiple: true,
 | 
	
		
			
				|  |  | +      // 显示搜索条件
 | 
	
		
			
				|  |  | +      showSearch: true,
 | 
	
		
			
				|  |  | +      //区域
 | 
	
		
			
				|  |  | +      roleOptions: [],
 | 
	
		
			
				|  |  | +       //全部检查机构
 | 
	
		
			
				|  |  | +  orgOptions: [],
 | 
	
		
			
				|  |  | +      //搜索tree
 | 
	
		
			
				|  |  | +      deptName: null,
 | 
	
		
			
				|  |  | +      // 部门树选项
 | 
	
		
			
				|  |  | +      deptOptions: [],
 | 
	
		
			
				|  |  | +      // 总条数
 | 
	
		
			
				|  |  | +      total: 0,
 | 
	
		
			
				|  |  | +      //区域集合
 | 
	
		
			
				|  |  | +      areaList: [],
 | 
	
		
			
				|  |  | +      // 区域采集点表格数据
 | 
	
		
			
				|  |  | +      checkList: [],
 | 
	
		
			
				|  |  | +      // 弹出层标题
 | 
	
		
			
				|  |  | +      title: "",
 | 
	
		
			
				|  |  | +      // 是否显示弹出层
 | 
	
		
			
				|  |  | +      open: false,
 | 
	
		
			
				|  |  | +      // 查询参数
 | 
	
		
			
				|  |  | +      queryParams: {
 | 
	
		
			
				|  |  | +        pageNum: 1,
 | 
	
		
			
				|  |  | +        pageSize: 10,
 | 
	
		
			
				|  |  | +        checkName: null,
 | 
	
		
			
				|  |  | +        areaId: null,
 | 
	
		
			
				|  |  | +        orgId: null,
 | 
	
		
			
				|  |  | +        searchTime:new Date()
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      next () {
 | 
	
		
			
				|  |  | -        this.year = this.year * 1 + 1
 | 
	
		
			
				|  |  | +      orgName:null,
 | 
	
		
			
				|  |  | +      // 表单参数
 | 
	
		
			
				|  |  | +      form: {},
 | 
	
		
			
				|  |  | +      // 表单校验
 | 
	
		
			
				|  |  | +      checkList: [],
 | 
	
		
			
				|  |  | +      roleOptions: [],
 | 
	
		
			
				|  |  | +      defaultKeys: [],
 | 
	
		
			
				|  |  | +      //是否关联下级
 | 
	
		
			
				|  |  | +      checked: false,
 | 
	
		
			
				|  |  | +      defaultProps: {
 | 
	
		
			
				|  |  | +        children: "children",
 | 
	
		
			
				|  |  | +        label: "name"
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      selectSeason (i) {
 | 
	
		
			
				|  |  | -        for (let j in $('.season-item')) {
 | 
	
		
			
				|  |  | -          $('.season-item').eq(j).css('color', '#fff')
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        $('.season-item').eq(i).css('color', '#249bff')
 | 
	
		
			
				|  |  | -        this.season = i + 1
 | 
	
		
			
				|  |  | -        let arr = this.valueArr[i].split('-')
 | 
	
		
			
				|  |  | -        this.getValue(this.year + arr[0] + '-' + this.year + arr[1])
 | 
	
		
			
				|  |  | -        this.showSeason = false
 | 
	
		
			
				|  |  | -        this.showValue = `${this.year}年${this.season}季度`
 | 
	
		
			
				|  |  | -        this.$emit('getQuarter', this.year, this.season)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      rules: {
 | 
	
		
			
				|  |  | +        areaId: [
 | 
	
		
			
				|  |  | +          {required: true, message: '请选择区域', trigger: 'blur'},
 | 
	
		
			
				|  |  | +        ],
 | 
	
		
			
				|  |  | +        orgType: [
 | 
	
		
			
				|  |  | +          {required: true, message: '请选择机构类型', trigger: 'blur'},
 | 
	
		
			
				|  |  | +        ],
 | 
	
		
			
				|  |  | +        checkName: [
 | 
	
		
			
				|  |  | +          {required: true, message: '请输入NFC点位名称', trigger: 'change'}
 | 
	
		
			
				|  |  | +        ],
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      defaultKeys: []
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +  watch: {
 | 
	
		
			
				|  |  | +    // 根据名称筛选部门树
 | 
	
		
			
				|  |  | +    deptName(val) {
 | 
	
		
			
				|  |  | +      this.$refs.tree.filter(val);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  /** 查询机构树数据 */
 | 
	
		
			
				|  |  | -  getDeptTree() {
 | 
	
		
			
				|  |  | -      deptTreeSelect().then((response) => {
 | 
	
		
			
				|  |  | -        this.deptOptions = response.data;
 | 
	
		
			
				|  |  | -        this.queryParams.orgId=response.data[0].id;
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +  created() {
 | 
	
		
			
				|  |  | +  //  this.getDeptTree();
 | 
	
		
			
				|  |  | +  this. getList();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  if (this.defaultValue) {
 | 
	
		
			
				|  |  | +    let value = this.defaultValue
 | 
	
		
			
				|  |  | +    let arr = value.split('-')
 | 
	
		
			
				|  |  | +    this.year = arr[0].slice(0, 4)
 | 
	
		
			
				|  |  | +    let str = arr[0].slice(4, 6) + '-' + arr[1].slice(4, 6)
 | 
	
		
			
				|  |  | +    let arrAll = this.valueArr
 | 
	
		
			
				|  |  | +    this.showValue = `${this.year}年${arrAll.indexOf(str) + 1}季度`
 | 
	
		
			
				|  |  | +  };
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    getDefaultOrg(node) {
 | 
	
		
			
				|  |  | +      this.queryParams.orgId = node.id;
 | 
	
		
			
				|  |  | +      this.selectedOrgName = node.shortName;
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -        /** treeSelect组件自定义数据*/
 | 
	
		
			
				|  |  | -        tenantIdnormalizer(node, instanceId) {
 | 
	
		
			
				|  |  | -      if (node.children && !node.children.length) {
 | 
	
		
			
				|  |  | -        delete node.children;
 | 
	
		
			
				|  |  | +        //单选框状态改变
 | 
	
		
			
				|  |  | +        checkChange(state) {
 | 
	
		
			
				|  |  | +      this.queryParams.checkSub = state;
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +            // 节点单击事件
 | 
	
		
			
				|  |  | +            clickTreeNode(data) {
 | 
	
		
			
				|  |  | +      if(data==null){
 | 
	
		
			
				|  |  | +        return;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      return {
 | 
	
		
			
				|  |  | -        id: node.id,
 | 
	
		
			
				|  |  | -        label: node.shortName,
 | 
	
		
			
				|  |  | -        children: node.children,
 | 
	
		
			
				|  |  | -      };
 | 
	
		
			
				|  |  | +      this.queryParams.orgId = data.id;
 | 
	
		
			
				|  |  | +      this.selectedOrgName = data.shortName;
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -        getPageIndex($index) {
 | 
	
		
			
				|  |  | -          //表格序号
 | 
	
		
			
				|  |  | -          return (
 | 
	
		
			
				|  |  | -            (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
 | 
	
		
			
				|  |  | -          );
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        handleExport() {
 | 
	
		
			
				|  |  | -      this.download('core/resumptionReport/standbyPowerExport', {
 | 
	
		
			
				|  |  | -        ...this.queryParams
 | 
	
		
			
				|  |  | -      }, `${'【'+this.orgName+'】'+'-备用电源维护报表-'+this.formatTime(new Date(),'YYYYMMDD')}.xlsx`)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  //   prev () {
 | 
	
		
			
				|  |  | +  //   this.year = this.year * 1 - 1
 | 
	
		
			
				|  |  | +  // },
 | 
	
		
			
				|  |  | +  // next () {
 | 
	
		
			
				|  |  | +  //   this.year = this.year * 1 + 1
 | 
	
		
			
				|  |  | +  // },
 | 
	
		
			
				|  |  | +  // selectSeason (i) {
 | 
	
		
			
				|  |  | +  //   for (let j in $('.season-item')) {
 | 
	
		
			
				|  |  | +  //     $('.season-item').eq(j).css('color', '#fff')
 | 
	
		
			
				|  |  | +  //   }
 | 
	
		
			
				|  |  | +  //   $('.season-item').eq(i).css('color', '#249bff')
 | 
	
		
			
				|  |  | +  //   this.season = i + 1
 | 
	
		
			
				|  |  | +  //   let arr = this.valueArr[i].split('-')
 | 
	
		
			
				|  |  | +  //   this.getValue(this.year + arr[0] + '-' + this.year + arr[1])
 | 
	
		
			
				|  |  | +  //   this.showSeason = false
 | 
	
		
			
				|  |  | +  //   this.showValue = `${this.year}年${this.season}季度`
 | 
	
		
			
				|  |  | +  //   this.$emit('getQuarter', this.year, this.season)
 | 
	
		
			
				|  |  | +  // },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/** 查询机构树数据 */
 | 
	
		
			
				|  |  | +getDeptTree() {
 | 
	
		
			
				|  |  | +  deptTreeSelect().then((response) => {
 | 
	
		
			
				|  |  | +    this.deptOptions = response.data;
 | 
	
		
			
				|  |  | +    this.queryParams.orgId=response.data[0].id;
 | 
	
		
			
				|  |  | +  });
 | 
	
		
			
				|  |  | +},
 | 
	
		
			
				|  |  | +    /** treeSelect组件自定义数据*/
 | 
	
		
			
				|  |  | +    tenantIdnormalizer(node, instanceId) {
 | 
	
		
			
				|  |  | +  if (node.children && !node.children.length) {
 | 
	
		
			
				|  |  | +    delete node.children;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  return {
 | 
	
		
			
				|  |  | +    id: node.id,
 | 
	
		
			
				|  |  | +    label: node.shortName,
 | 
	
		
			
				|  |  | +    children: node.children,
 | 
	
		
			
				|  |  | +  };
 | 
	
		
			
				|  |  | +},
 | 
	
		
			
				|  |  | +    getPageIndex($index) {
 | 
	
		
			
				|  |  | +      //表格序号
 | 
	
		
			
				|  |  | +      return (
 | 
	
		
			
				|  |  | +        (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    handleExport() {
 | 
	
		
			
				|  |  | +  this.download('core/resumptionReport/standbyPowerExport', {
 | 
	
		
			
				|  |  | +    ...this.queryParams
 | 
	
		
			
				|  |  | +  }, `${'【'+this.orgName+'】'+'-备用电源维护报表-'+this.formatTime(new Date(),'YYYYMMDD')}.xlsx`)
 | 
	
		
			
				|  |  | +},
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        getList() {
 | 
	
		
			
				|  |  | -          this.loading = true;
 | 
	
		
			
				|  |  | -          listStandbyPowerReport(this.queryParams).then(response => {
 | 
	
		
			
				|  |  | -            this.checkList = response.data;
 | 
	
		
			
				|  |  | -            this.title=response.title;
 | 
	
		
			
				|  |  | -            this.orgName=response.orgName;
 | 
	
		
			
				|  |  | -            this.loading = false;
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        getAllOrg() {
 | 
	
		
			
				|  |  | -          selectAllOrg().then(response => {
 | 
	
		
			
				|  |  | -        this.orgOptions = response.data;
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  | +      this.loading = true;
 | 
	
		
			
				|  |  | +      listStandbyPowerReport(this.queryParams).then(response => {
 | 
	
		
			
				|  |  | +        this.checkList = response.data;
 | 
	
		
			
				|  |  | +        this.title=response.title;
 | 
	
		
			
				|  |  | +        this.orgName=response.orgName;
 | 
	
		
			
				|  |  | +        this.loading = false;
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    getAllOrg() {
 | 
	
		
			
				|  |  | +      selectAllOrg().then(response => {
 | 
	
		
			
				|  |  | +    this.orgOptions = response.data;
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  | +},
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        // 取消按钮
 | 
	
		
			
				|  |  | -        cancel() {
 | 
	
		
			
				|  |  | -          this.open = false;
 | 
	
		
			
				|  |  | -          this.reset();
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        // 表单重置
 | 
	
		
			
				|  |  | -        reset() {
 | 
	
		
			
				|  |  | -          this.form = {
 | 
	
		
			
				|  |  | -            id: null,
 | 
	
		
			
				|  |  | -            checkName: null,
 | 
	
		
			
				|  |  | -            areaId: null,
 | 
	
		
			
				|  |  | -            orgId: null,
 | 
	
		
			
				|  |  | -            createTime: null,
 | 
	
		
			
				|  |  | -            updateTime: null,
 | 
	
		
			
				|  |  | -            updateId: null,
 | 
	
		
			
				|  |  | -            createBy: null,
 | 
	
		
			
				|  |  | -            delFlag: null,
 | 
	
		
			
				|  |  | -            updateBy: null
 | 
	
		
			
				|  |  | -          };
 | 
	
		
			
				|  |  | -          this.resetForm("form");
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        /** 搜索按钮操作 */
 | 
	
		
			
				|  |  | -        handleQuery() {
 | 
	
		
			
				|  |  | -          this.queryParams.pageNum = 1;
 | 
	
		
			
				|  |  | -          this.getList();
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        /** 重置按钮操作 */
 | 
	
		
			
				|  |  | -        resetQuery() {
 | 
	
		
			
				|  |  | -          this.resetForm("queryForm");
 | 
	
		
			
				|  |  | -          this.handleQuery();
 | 
	
		
			
				|  |  | -          this.getDeptTree();
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        // 多选框选中数据
 | 
	
		
			
				|  |  | -        handleSelectionChange(selection) {
 | 
	
		
			
				|  |  | -          this.ids = selection.map(item => item.id)
 | 
	
		
			
				|  |  | -          this.names = selection.map(item => item.checkName)
 | 
	
		
			
				|  |  | -          this.single = selection.length !== 1
 | 
	
		
			
				|  |  | -          this.multiple = !selection.length
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | +    // 取消按钮
 | 
	
		
			
				|  |  | +    cancel() {
 | 
	
		
			
				|  |  | +      this.open = false;
 | 
	
		
			
				|  |  | +      this.reset();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 表单重置
 | 
	
		
			
				|  |  | +    reset() {
 | 
	
		
			
				|  |  | +      this.form = {
 | 
	
		
			
				|  |  | +        id: null,
 | 
	
		
			
				|  |  | +        checkName: null,
 | 
	
		
			
				|  |  | +        areaId: null,
 | 
	
		
			
				|  |  | +        orgId: null,
 | 
	
		
			
				|  |  | +        createTime: null,
 | 
	
		
			
				|  |  | +        updateTime: null,
 | 
	
		
			
				|  |  | +        updateId: null,
 | 
	
		
			
				|  |  | +        createBy: null,
 | 
	
		
			
				|  |  | +        delFlag: null,
 | 
	
		
			
				|  |  | +        updateBy: null
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.resetForm("form");
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 搜索按钮操作 */
 | 
	
		
			
				|  |  | +    handleQuery() {
 | 
	
		
			
				|  |  | +      this.queryParams.pageNum = 1;
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    /** 重置按钮操作 */
 | 
	
		
			
				|  |  | +    resetQuery() {
 | 
	
		
			
				|  |  | +      this.resetForm("queryForm");
 | 
	
		
			
				|  |  | +      this.handleQuery();
 | 
	
		
			
				|  |  | +     // this.getDeptTree();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 多选框选中数据
 | 
	
		
			
				|  |  | +    handleSelectionChange(selection) {
 | 
	
		
			
				|  |  | +      this.ids = selection.map(item => item.id)
 | 
	
		
			
				|  |  | +      this.names = selection.map(item => item.checkName)
 | 
	
		
			
				|  |  | +      this.single = selection.length !== 1
 | 
	
		
			
				|  |  | +      this.multiple = !selection.length
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    };
 | 
	
		
			
				|  |  | -  </script>
 | 
	
		
			
				|  |  | -  <style lang="scss" scoped>
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<style lang="scss" scoped>
 | 
	
		
			
				|  |  |    ::v-deep.formTreeItem {
 | 
	
		
			
				|  |  |      .el-form-item__content {
 | 
	
		
			
				|  |  |        width: 264px;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -  </style>
 | 
	
		
			
				|  |  | +  </style>
 |