|
|
|
@ -1,206 +1,232 @@
|
|
|
|
|
<!-- 资产管理 -- web系统 -->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="L-main" id="L-size-main">
|
|
|
|
|
<div class="content-search" id="L-header">
|
|
|
|
|
<div class="search-title">查询条件</div>
|
|
|
|
|
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="系统名称:" prop="xtmc">
|
|
|
|
|
<el-input v-model="formInline.xtmc" placeholder="请输入系统名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="系统类型:" prop="xtlx">
|
|
|
|
|
<el-select v-model="formInline.xtlx" placeholder="请选择系统类型">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.zc_xtlx"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="新增时间:" prop="time">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="formInline.time"
|
|
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
|
end-placeholder="结束时间"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="单位名称:" prop="dwmc">
|
|
|
|
|
<el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="系统状态:" prop="xtzt">
|
|
|
|
|
<el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.zc_xtzt"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" style="text-align: right;padding-right: 50px;">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button size="mini" @click="resetQuery('queryFrom')">重置</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')">查询</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<main>
|
|
|
|
|
<div class="search-title">
|
|
|
|
|
<span class="search-title-span">资产列表</span>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="info"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-upload2"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleImport"
|
|
|
|
|
>导入</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="warning"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
>新增资产</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20" style="height: 100%;background-color: #F2F4F6;display: flex;">
|
|
|
|
|
<!--部门数据-->
|
|
|
|
|
<el-col :span="3" :xs="24" style="margin-right: 10px;height: 100%; background-color: #fff;padding-top: 20px;">
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
<el-tree
|
|
|
|
|
:data="deptOptions"
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
|
:filter-node-method="filterNode"
|
|
|
|
|
ref="tree"
|
|
|
|
|
node-key="id"
|
|
|
|
|
default-expand-all
|
|
|
|
|
highlight-current
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<section>
|
|
|
|
|
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :row-class-name="tableRowClassName" :max-height="tabHeader">
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" align="center"/>
|
|
|
|
|
<el-table-column label="系统名称" key="xtmc" width="200px" prop="xtmc" align="center" />
|
|
|
|
|
<el-table-column label="系统类型" key="xtlx" prop="xtlx" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
|
|
|
|
|
<!-- <template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
|
|
|
|
|
</template> -->
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="新增时间" key="createTime" prop="createTime" align="center" />
|
|
|
|
|
<el-table-column label="系统状态" key="status" prop="status" class-name="table-status" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.xtzt == 1" style="color: #16B771;">
|
|
|
|
|
已安装
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 2" style="color: #F58A0C;">
|
|
|
|
|
测试中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 3" style="color: #1485EF;">
|
|
|
|
|
使用中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 4" style="color: #29A07A;">
|
|
|
|
|
维护中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 5" style="color: #F50C0C;">
|
|
|
|
|
关停
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,1)">
|
|
|
|
|
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #1485EF;margin-right: 15px;">查看</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,2)">
|
|
|
|
|
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #1485EF;margin-right: 15px;">编辑</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,3)">
|
|
|
|
|
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #F50C0C;margin-right: 15px;">删除</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</section>
|
|
|
|
|
<my-pagination
|
|
|
|
|
id="L-pagination"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page="formInline.current"
|
|
|
|
|
:limit="formInline.size"
|
|
|
|
|
@pagination="getPagination"
|
|
|
|
|
:current-page.sync="formInline.current"
|
|
|
|
|
></my-pagination>
|
|
|
|
|
</main>
|
|
|
|
|
<!-- 资产导入对话框 -->
|
|
|
|
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
|
|
|
<el-upload
|
|
|
|
|
ref="upload"
|
|
|
|
|
:limit="1"
|
|
|
|
|
accept=".xlsx, .xls"
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
|
|
|
:disabled="upload.isUploading"
|
|
|
|
|
:on-progress="handleFileUploadProgress"
|
|
|
|
|
:on-success="handleFileSuccess"
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
drag
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
<div class="el-upload__tip text-center" slot="tip">
|
|
|
|
|
<!-- <div class="el-upload__tip" slot="tip">
|
|
|
|
|
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
|
|
|
|
|
</div> -->
|
|
|
|
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
|
|
|
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="20" :xs="24" style="height: 100%;flex: 1;">
|
|
|
|
|
<div class="L-main" id="L-size-main">
|
|
|
|
|
<div class="content-search" id="L-header">
|
|
|
|
|
<div class="search-title">查询条件</div>
|
|
|
|
|
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="系统名称:" prop="xtmc">
|
|
|
|
|
<el-input v-model="formInline.xtmc" placeholder="请输入系统名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="系统类型:" prop="xtlx">
|
|
|
|
|
<el-select v-model="formInline.xtlx" placeholder="请选择系统类型">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.zc_xtlx"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="新增时间:" prop="time">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="formInline.time"
|
|
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
|
end-placeholder="结束时间"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="单位名称:" prop="dwmc">
|
|
|
|
|
<el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="系统状态:" prop="xtzt">
|
|
|
|
|
<el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.zc_xtzt"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="9" style="text-align: right;padding-right: 35px;">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button size="mini" @click="resetQuery('queryFrom')">重置</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')">查询</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
|
|
<el-button @click="upload.open = false">取 消</el-button>
|
|
|
|
|
<main>
|
|
|
|
|
<div class="search-title">
|
|
|
|
|
<span class="search-title-span">资产列表</span>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="info"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-upload2"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleImport"
|
|
|
|
|
>导入</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="warning"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
>新增资产</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
<section>
|
|
|
|
|
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :row-class-name="tableRowClassName" :max-height="tabHeader">
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" align="center"/>
|
|
|
|
|
<el-table-column label="系统名称" key="xtmc" width="200px" prop="xtmc" align="center" />
|
|
|
|
|
<el-table-column label="系统类型" key="xtlx" prop="xtlx" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
|
|
|
|
|
<!-- <template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
|
|
|
|
|
</template> -->
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="新增时间" key="createTime" prop="createTime" align="center" />
|
|
|
|
|
<el-table-column label="系统状态" key="status" prop="status" class-name="table-status" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.xtzt == 1" style="color: #16B771;">
|
|
|
|
|
已安装
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 2" style="color: #F58A0C;">
|
|
|
|
|
测试中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 3" style="color: #1485EF;">
|
|
|
|
|
使用中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 4" style="color: #29A07A;">
|
|
|
|
|
维护中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 5" style="color: #F50C0C;">
|
|
|
|
|
关停
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,1)">
|
|
|
|
|
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #1485EF;margin-right: 15px;">查看</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,2)">
|
|
|
|
|
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #1485EF;margin-right: 15px;">编辑</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,3)">
|
|
|
|
|
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #F50C0C;margin-right: 15px;">删除</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</section>
|
|
|
|
|
<my-pagination
|
|
|
|
|
id="L-pagination"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page="formInline.current"
|
|
|
|
|
:limit="formInline.size"
|
|
|
|
|
@pagination="getPagination"
|
|
|
|
|
:current-page.sync="formInline.current"
|
|
|
|
|
></my-pagination>
|
|
|
|
|
</main>
|
|
|
|
|
<!-- 资产导入对话框 -->
|
|
|
|
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
|
|
|
<el-upload
|
|
|
|
|
ref="upload"
|
|
|
|
|
:limit="1"
|
|
|
|
|
accept=".xlsx, .xls"
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
|
|
|
:disabled="upload.isUploading"
|
|
|
|
|
:on-progress="handleFileUploadProgress"
|
|
|
|
|
:on-success="handleFileSuccess"
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
drag
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
<div class="el-upload__tip text-center" slot="tip">
|
|
|
|
|
<!-- <div class="el-upload__tip" slot="tip">
|
|
|
|
|
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
|
|
|
|
|
</div> -->
|
|
|
|
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
|
|
|
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
|
|
<el-button @click="upload.open = false">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import myPagination from "@/views/components/Pagination/index.vue"
|
|
|
|
|
// import myDialog from "@/views/components/myDialog/index.vue"
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
import { assetUnit, deleteAssetInfo } from "@/api/auditPagesApi/index";
|
|
|
|
|
import { assetUnit, deleteAssetInfo, schema } from "@/api/auditPagesApi/index";
|
|
|
|
|
export default {
|
|
|
|
|
dicts: ['zc_xtzt','zc_xtlx'],
|
|
|
|
|
components:{myPagination},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 部门树选项
|
|
|
|
|
deptOptions: undefined,
|
|
|
|
|
defaultProps: {
|
|
|
|
|
children: "children",
|
|
|
|
|
label: "label"
|
|
|
|
|
},
|
|
|
|
|
formInline:{
|
|
|
|
|
xtmc:"",
|
|
|
|
|
xtlx:"",
|
|
|
|
@ -235,6 +261,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getDeptTree();
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
},
|
|
|
|
@ -242,6 +269,22 @@ export default {
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
/** 查询部门下拉树结构 */
|
|
|
|
|
getDeptTree() {
|
|
|
|
|
schema({type:0}).then(response => {
|
|
|
|
|
this.deptOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 筛选节点
|
|
|
|
|
filterNode(value, data) {
|
|
|
|
|
if (!value) return true;
|
|
|
|
|
return data.label.indexOf(value) !== -1;
|
|
|
|
|
},
|
|
|
|
|
// 节点单击事件
|
|
|
|
|
handleNodeClick(data) {
|
|
|
|
|
this.formInline.deptId = data.id;
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
// 获取列表
|
|
|
|
|
getList(){
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -254,6 +297,8 @@ export default {
|
|
|
|
|
// 重置
|
|
|
|
|
resetQuery(){
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.formInline.deptId = undefined;
|
|
|
|
|
this.$refs.tree.setCurrentKey(null);
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
// 查询
|
|
|
|
|