李劲龙 1 month ago
commit 38e614c8df

@ -5,7 +5,7 @@ VUE_APP_TITLE = 太仓资产管理系统
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.0.115:9115' VUE_APP_BASE_API = 'http://192.168.0.119:9115'
# VUE_APP_BASE_API = 'http://39.101.188.84:9115' # VUE_APP_BASE_API = 'http://39.101.188.84:9115'
# 路由懒加载 # 路由懒加载

@ -232,4 +232,13 @@ export function editPassword(id) {
url:"/tc/unit/edit/" + id, url:"/tc/unit/edit/" + id,
method:"get" method:"get"
}) })
}
// 根据资产类型获取组织架构
export function schema(type){
return request({
url:"/tc/schema",
method:"get",
params:type
})
} }

@ -1,192 +1,218 @@
<!-- 资产管理 -- 电子邮件 --> <!-- 资产管理 -- 电子邮件 -->
<template> <template>
<div class="L-main" id="L-size-main"> <el-row :gutter="20" style="height: 100%;background-color: #F2F4F6;display: flex;">
<div class="content-search" id="L-header"> <!--部门数据-->
<div class="search-title">查询条件</div> <el-col :span="3" :xs="24" style="margin-right: 10px;height: 100%; background-color: #fff;padding-top: 20px;">
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline"> <div class="head-container">
<el-row> <el-tree
<el-col :span="7"> :data="deptOptions"
<el-form-item label="所属单位:" prop="dwmc"> :props="defaultProps"
<el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input> :expand-on-click-node="false"
</el-form-item> :filter-node-method="filterNode"
</el-col> ref="tree"
<el-col :span="7"> node-key="id"
<el-form-item label="电子邮箱后缀:" prop="dzyxhz"> default-expand-all
<el-input v-model="formInline.dzyxhz" placeholder="请输入电子邮箱后缀"></el-input> highlight-current
</el-form-item> @node-click="handleNodeClick"
</el-col> />
<el-col :span="7">
<el-form-item label="新增时间:" prop="time">
<el-date-picker
v-model="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-col :span="3" style="text-align: right;">
<el-form-item class="unit-form">
<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-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>
</div> </div>
<section> </el-col>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :row-class-name="tableRowClassName" :max-height="tabHeader"> <el-col :span="20" :xs="24" style="height: 100%;flex: 1;">
<el-table-column type="index" width="50" label="序号" align="center"/> <div class="L-main" id="L-size-main">
<el-table-column label="所属单位" key="ssdw" prop="ssdw" align="center" /> <div class="content-search" id="L-header">
<el-table-column label="电子邮箱后缀" key="dzyxhz" prop="dzyxhz" align="center" /> <div class="search-title">查询条件</div>
<el-table-column label="邮件系统供应商" key="yjxtgys" prop="yjxtgys" align="center"> <el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline">
<!-- <template slot-scope="scope"> <el-row>
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/> <el-col :span="6">
</template> --> <el-form-item label="所属单位:" prop="dwmc">
</el-table-column> <el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input>
<el-table-column label="新增时间" key="createTime" prop="createTime" align="center" /> </el-form-item>
<el-table-column label="邮件系统状态" key="status" prop="status" class-name="table-status" align="center"> </el-col>
<template slot-scope="scope"> <el-col :span="6">
<span v-if="scope.row.yjxtzc == 1" style="color: #16B771;"> <el-form-item label="电子邮箱后缀:" prop="dzyxhz">
正常 <el-input v-model="formInline.dzyxhz" placeholder="请输入电子邮箱后缀"></el-input>
</span> </el-form-item>
<span v-if="scope.row.yjxtzc == 2" style="color: #F58A0C;"> </el-col>
停用 <el-col :span="6">
</span> <el-form-item label="新增时间:" prop="time">
</template> <el-date-picker
</el-table-column> v-model="time"
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center"> format="yyyy-MM-dd HH:mm:ss"
<template slot-scope="scope"> value-format="yyyy-MM-dd HH:mm:ss"
<div style="display: flex;align-items: center;justify-content: center;"> type="datetimerange"
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,1)"> start-placeholder="开始时间"
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;"> end-placeholder="结束时间"
<span class="look-info" style="color: #1485EF;margin-right: 15px;">查看</span> placeholder="请选择"
</div> >
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,2)"> </el-date-picker>
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;"> </el-form-item>
<span class="look-info" style="color: #1485EF;margin-right: 15px;">编辑</span> </el-col>
</div> <el-col :span="6" style="text-align: right;">
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,3)"> <el-form-item class="unit-form">
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;"> <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<span class="look-info" style="color: #F50C0C;margin-right: 15px;">删除</span> <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
</div> </el-form-item>
</div> </el-col>
</template> </el-row>
</el-table-column> <!-- <el-row>
</el-table> <el-col :span="8">
</section> <el-form-item label="单位名称:" prop="dwmc">
<my-pagination <el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
id="L-pagination" </el-form-item>
:total="total" </el-col>
:page="formInline.current" <el-col :span="8">
:limit="formInline.size" <el-form-item label="系统状态:" prop="xtzt">
@pagination="getPagination" <el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
:current-page.sync="formInline.current" <el-option
></my-pagination> v-for="dict in dict.type.zc_xtzt"
</main> :key="dict.value"
<!-- 资产导入对话框 --> :label="dict.label"
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> :value="dict.value">
<el-upload </el-option>
ref="upload" </el-select>
:limit="1" </el-form-item>
accept=".xlsx, .xls" </el-col>
:headers="upload.headers" <el-col :span="8" style="text-align: right;padding-right: 50px;">
:action="upload.url + '?updateSupport=' + upload.updateSupport" <el-form-item>
:disabled="upload.isUploading" <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
:on-progress="handleFileUploadProgress" <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
:on-success="handleFileSuccess" </el-form-item>
:auto-upload="false" </el-col>
drag </el-row> -->
> </el-form>
<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>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link>
</div> </div>
</el-upload> <main>
<div slot="footer" class="dialog-footer"> <div class="search-title">
<el-button type="primary" @click="submitFileForm"> </el-button> <span class="search-title-span">资产列表</span>
<el-button @click="upload.open = false"> </el-button> <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="ssdw" prop="ssdw" align="center" />
<el-table-column label="电子邮箱后缀" key="dzyxhz" prop="dzyxhz" align="center" />
<el-table-column label="邮件系统供应商" key="yjxtgys" prop="yjxtgys" 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.yjxtzc == 1" style="color: #16B771;">
正常
</span>
<span v-if="scope.row.yjxtzc == 2" style="color: #F58A0C;">
停用
</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>仅允许导入xlsxlsx格式文件</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> </div>
</el-dialog> </el-col>
</div> </el-row>
</template> </template>
<script> <script>
import myPagination from "@/views/components/Pagination/index.vue" import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue" // import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { assetEmailList, deleteAssetEmail } from "@/api/auditPagesApi/index"; import { assetEmailList, deleteAssetEmail, schema } from "@/api/auditPagesApi/index";
export default { export default {
dicts: ['zc_xtzt','zc_xtlx'], dicts: ['zc_xtzt','zc_xtlx'],
components:{myPagination}, components:{myPagination},
data() { data() {
return { return {
//
deptOptions: undefined,
defaultProps: {
children: "children",
label: "label"
},
formInline:{ formInline:{
dzyxhz:"", dzyxhz:"",
dwmc:"", dwmc:"",
@ -219,6 +245,7 @@ export default {
}, },
mounted(){ mounted(){
this.getList(); this.getList();
this.getDeptTree();
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce); window.addEventListener('resize', this.cancalDebounce);
}, },
@ -226,6 +253,22 @@ export default {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);
}, },
methods:{ methods:{
/** 查询部门下拉树结构 */
getDeptTree() {
schema({type:3}).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(){ getList(){
this.loading = true; this.loading = true;
@ -239,6 +282,8 @@ export default {
resetQuery(){ resetQuery(){
this.resetForm("queryForm"); this.resetForm("queryForm");
this.time = []; this.time = [];
this.formInline.deptId = undefined;
this.$refs.tree.setCurrentKey(null);
this.handleQuery(); this.handleQuery();
}, },
// //

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

@ -1,195 +1,221 @@
<!-- 资产管理 -- 移动应用系统 --> <!-- 资产管理 -- 移动应用系统 -->
<template> <template>
<div class="L-main" id="L-size-main"> <el-row :gutter="20" style="height: 100%;background-color: #F2F4F6;display: flex;">
<div class="content-search" id="L-header"> <!--部门数据-->
<div class="search-title">查询条件</div> <el-col :span="3" :xs="24" style="margin-right: 10px;height: 100%; background-color: #fff;padding-top: 20px;">
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline"> <div class="head-container">
<el-row> <el-tree
<el-col :span="7"> :data="deptOptions"
<el-form-item label="所属单位:" prop="dwmc"> :props="defaultProps"
<el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input> :expand-on-click-node="false"
</el-form-item> :filter-node-method="filterNode"
</el-col> ref="tree"
<el-col :span="7"> node-key="id"
<el-form-item label="移动应用名称:" prop="yymc"> default-expand-all
<el-input v-model="formInline.yymc" placeholder="请输入移动应用名称"></el-input> highlight-current
</el-form-item> @node-click="handleNodeClick"
</el-col> />
<el-col :span="7">
<el-form-item label="新增时间:" prop="time">
<el-date-picker
v-model="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-col :span="3" style="text-align: right;">
<el-form-item class="unit-form">
<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-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>
</div> </div>
<section> </el-col>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :row-class-name="tableRowClassName" :max-height="tabHeader"> <el-col :span="20" :xs="24" style="height: 100%;flex: 1;">
<el-table-column type="index" width="50" label="序号" align="center"/> <div class="L-main" id="L-size-main">
<el-table-column label="移动应用名称" key="appName" prop="appName" align="center" /> <div class="content-search" id="L-header">
<el-table-column label="所属单位" key="ssdw" prop="ssdw" align="center" /> <div class="search-title">查询条件</div>
<!-- <el-table-column label="icp备案状态" key="dwmc" prop="dwmc" align="center"> <el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline">
<template slot-scope="scope"> <el-row>
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/> <el-col :span="6">
</template> <el-form-item label="所属单位:" prop="dwmc">
</el-table-column> --> <el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input>
<el-table-column label="新增时间" key="createTime" prop="createTime" align="center" /> </el-form-item>
<el-table-column label="icp备案状态" key="status" prop="status" class-name="table-status" align="center"> </el-col>
<template slot-scope="scope"> <el-col :span="6">
<span v-if="scope.row.icpState == 1" style="color: #F58A0C;"> <el-form-item label="移动应用名称:" prop="yymc">
未备案 <el-input v-model="formInline.yymc" placeholder="请输入移动应用名称"></el-input>
</span> </el-form-item>
<span v-if="scope.row.icpState == 2" style="color: #16B771;"> </el-col>
已备案 <el-col :span="6">
</span> <el-form-item label="新增时间:" prop="time">
<span v-if="scope.row.icpState == 3" style="color: #1485EF;"> <el-date-picker
非网站系统 v-model="time"
</span> format="yyyy-MM-dd HH:mm:ss"
</template> value-format="yyyy-MM-dd HH:mm:ss"
</el-table-column> type="datetimerange"
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center"> start-placeholder="开始时间"
<template slot-scope="scope"> end-placeholder="结束时间"
<div style="display: flex;align-items: center;justify-content: center;"> placeholder="请选择"
<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;"> </el-date-picker>
<span class="look-info" style="color: #1485EF;margin-right: 15px;">查看</span> </el-form-item>
</div> </el-col>
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,2)"> <el-col :span="6" style="text-align: right;">
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;"> <el-form-item class="unit-form">
<span class="look-info" style="color: #1485EF;margin-right: 15px;">编辑</span> <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
</div> <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,3)"> </el-form-item>
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;"> </el-col>
<span class="look-info" style="color: #F50C0C;margin-right: 15px;">删除</span> </el-row>
</div> <!-- <el-row>
</div> <el-col :span="8">
</template> <el-form-item label="单位名称:" prop="dwmc">
</el-table-column> <el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
</el-table> </el-form-item>
</section> </el-col>
<my-pagination <el-col :span="8">
id="L-pagination" <el-form-item label="系统状态:" prop="xtzt">
:total="total" <el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
:page="formInline.current" <el-option
:limit="formInline.size" v-for="dict in dict.type.zc_xtzt"
@pagination="getPagination" :key="dict.value"
:current-page.sync="formInline.current" :label="dict.label"
></my-pagination> :value="dict.value">
</main> </el-option>
<!-- 资产导入对话框 --> </el-select>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> </el-form-item>
<el-upload </el-col>
ref="upload" <el-col :span="8" style="text-align: right;padding-right: 50px;">
:limit="1" <el-form-item>
accept=".xlsx, .xls" <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
:headers="upload.headers" <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
:action="upload.url + '?updateSupport=' + upload.updateSupport" </el-form-item>
:disabled="upload.isUploading" </el-col>
:on-progress="handleFileUploadProgress" </el-row> -->
:on-success="handleFileSuccess" </el-form>
: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>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link>
</div> </div>
</el-upload> <main>
<div slot="footer" class="dialog-footer"> <div class="search-title">
<el-button type="primary" @click="submitFileForm"> </el-button> <span class="search-title-span">资产列表</span>
<el-button @click="upload.open = false"> </el-button> <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="appName" prop="appName" align="center" />
<el-table-column label="所属单位" key="ssdw" prop="ssdw" align="center" />
<!-- <el-table-column label="icp备案状态" 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="icp备案状态" key="status" prop="status" class-name="table-status" align="center">
<template slot-scope="scope">
<span v-if="scope.row.icpState == 1" style="color: #F58A0C;">
未备案
</span>
<span v-if="scope.row.icpState == 2" style="color: #16B771;">
已备案
</span>
<span v-if="scope.row.icpState == 3" style="color: #1485EF;">
非网站系统
</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>仅允许导入xlsxlsx格式文件</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> </div>
</el-dialog> </el-col>
</div> </el-row>
</template> </template>
<script> <script>
import myPagination from "@/views/components/Pagination/index.vue" import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue" // import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { assetAppList, deleteAssetApp } from "@/api/auditPagesApi/index"; import { assetAppList, deleteAssetApp, schema } from "@/api/auditPagesApi/index";
export default { export default {
dicts: ['zc_xtzt','zc_xtlx'], dicts: ['zc_xtzt','zc_xtlx'],
components:{myPagination}, components:{myPagination},
data() { data() {
return { return {
//
deptOptions: undefined,
defaultProps: {
children: "children",
label: "label"
},
formInline:{ formInline:{
dwmc:"", dwmc:"",
yymc:"", yymc:"",
@ -222,6 +248,7 @@ export default {
}, },
mounted(){ mounted(){
this.getList(); this.getList();
this.getDeptTree();
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce); window.addEventListener('resize', this.cancalDebounce);
}, },
@ -229,6 +256,22 @@ export default {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);
}, },
methods:{ methods:{
/** 查询部门下拉树结构 */
getDeptTree() {
schema({type:4}).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(){ getList(){
this.loading = true; this.loading = true;
@ -242,6 +285,8 @@ export default {
resetQuery(){ resetQuery(){
this.resetForm("queryForm"); this.resetForm("queryForm");
this.time = []; this.time = [];
this.formInline.deptId = undefined;
this.$refs.tree.setCurrentKey(null);
this.handleQuery(); this.handleQuery();
}, },
// //

@ -1,201 +1,227 @@
<!-- 资产管理 -- 公众号 --> <!-- 资产管理 -- 公众号 -->
<template> <template>
<div class="L-main" id="L-size-main"> <el-row :gutter="20" style="height: 100%;background-color: #F2F4F6;display: flex;">
<div class="content-search" id="L-header"> <!--部门数据-->
<div class="search-title">查询条件</div> <el-col :span="3" :xs="24" style="margin-right: 10px;height: 100%; background-color: #fff;padding-top: 20px;">
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline"> <div class="head-container">
<el-row> <el-tree
<el-col :span="7"> :data="deptOptions"
<el-form-item label="所属单位:" prop="dwmc"> :props="defaultProps"
<el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input> :expand-on-click-node="false"
</el-form-item> :filter-node-method="filterNode"
</el-col> ref="tree"
<el-col :span="7"> node-key="id"
<el-form-item label="公众号名称:" prop="gzhmc"> default-expand-all
<el-input v-model="formInline.gzhmc" placeholder="请输入公众号名称"></el-input> highlight-current
</el-form-item> @node-click="handleNodeClick"
</el-col> />
<el-col :span="7">
<el-form-item label="新增时间:" prop="time">
<el-date-picker
v-model="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-col :span="3" style="text-align: right;">
<el-form-item class="unit-form">
<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-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>
</div> </div>
<section> </el-col>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :row-class-name="tableRowClassName" :max-height="tabHeader"> <el-col :span="20" :xs="24" style="height: 100%;flex: 1;">
<el-table-column type="index" width="50" label="序号" align="center"/> <div class="L-main" id="L-size-main">
<el-table-column label="公众号名称" key="gzhmc" prop="gzhmc" align="center" /> <div class="content-search" id="L-header">
<el-table-column label="所属单位" key="ssdw" prop="ssdw" align="center" /> <div class="search-title">查询条件</div>
<!-- <el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center"> <el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline">
</el-table-column> --> <el-row>
<el-table-column label="新增时间" key="createTime" prop="createTime" align="center" /> <el-col :span="6">
<el-table-column label="公众号状态" key="status" prop="status" class-name="table-status" align="center"> <el-form-item label="所属单位:" prop="dwmc">
<template slot-scope="scope"> <el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input>
<span v-if="scope.row.gzhzt == 1" style="color: #16B771;"> </el-form-item>
正常 </el-col>
</span> <el-col :span="6">
<span v-if="scope.row.gzhzt == 2" style="color: #F58A0C;"> <el-form-item label="公众号名称:" prop="gzhmc">
注销 <el-input v-model="formInline.gzhmc" placeholder="请输入公众号名称"></el-input>
</span> </el-form-item>
<span v-if="scope.row.gzhzt == 3" style="color: #1485EF;"> </el-col>
迁移 <el-col :span="6">
</span> <el-form-item label="新增时间:" prop="time">
<span v-if="scope.row.gzhzt == 4" style="color: #29A07A;"> <el-date-picker
受限 v-model="time"
</span> format="yyyy-MM-dd HH:mm:ss"
<span v-if="scope.row.gzhzt == 5" style="color: #F50C0C;"> value-format="yyyy-MM-dd HH:mm:ss"
违规 type="datetimerange"
</span> start-placeholder="开始时间"
<span v-if="scope.row.gzhzt == 6" style="color: #F58A0C;"> end-placeholder="结束时间"
未知 placeholder="请选择"
</span> >
</template> </el-date-picker>
</el-table-column> </el-form-item>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center"> </el-col>
<template slot-scope="scope"> <el-col :span="6" style="text-align: right;">
<div style="display: flex;align-items: center;justify-content: center;"> <el-form-item class="unit-form">
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,1)"> <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;"> <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<span class="look-info" style="color: #1485EF;margin-right: 15px;">查看</span> </el-form-item>
</div> </el-col>
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,2)"> </el-row>
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;"> <!-- <el-row>
<span class="look-info" style="color: #1485EF;margin-right: 15px;">编辑</span> <el-col :span="8">
</div> <el-form-item label="单位名称:" prop="dwmc">
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,3)"> <el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;"> </el-form-item>
<span class="look-info" style="color: #F50C0C;margin-right: 15px;">删除</span> </el-col>
</div> <el-col :span="8">
</div> <el-form-item label="系统状态:" prop="xtzt">
</template> <el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
</el-table-column> <el-option
</el-table> v-for="dict in dict.type.zc_xtzt"
</section> :key="dict.value"
<my-pagination :label="dict.label"
id="L-pagination" :value="dict.value">
:total="total" </el-option>
:page="formInline.current" </el-select>
:limit="formInline.size" </el-form-item>
@pagination="getPagination" </el-col>
:current-page.sync="formInline.current" <el-col :span="8" style="text-align: right;padding-right: 50px;">
></my-pagination> <el-form-item>
</main> <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<!-- 资产导入对话框 --> <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> </el-form-item>
<el-upload </el-col>
ref="upload" </el-row> -->
:limit="1" </el-form>
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>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link>
</div> </div>
</el-upload> <main>
<div slot="footer" class="dialog-footer"> <div class="search-title">
<el-button type="primary" @click="submitFileForm"> </el-button> <span class="search-title-span">资产列表</span>
<el-button @click="upload.open = false"> </el-button> <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="gzhmc" prop="gzhmc" align="center" />
<el-table-column label="所属单位" key="ssdw" prop="ssdw" align="center" />
<!-- <el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
</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.gzhzt == 1" style="color: #16B771;">
正常
</span>
<span v-if="scope.row.gzhzt == 2" style="color: #F58A0C;">
注销
</span>
<span v-if="scope.row.gzhzt == 3" style="color: #1485EF;">
迁移
</span>
<span v-if="scope.row.gzhzt == 4" style="color: #29A07A;">
受限
</span>
<span v-if="scope.row.gzhzt == 5" style="color: #F50C0C;">
违规
</span>
<span v-if="scope.row.gzhzt == 6" style="color: #F58A0C;">
未知
</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>仅允许导入xlsxlsx格式文件</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> </div>
</el-dialog> </el-col>
</div> </el-row>
</template> </template>
<script> <script>
import myPagination from "@/views/components/Pagination/index.vue" import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue" // import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { assetOfficialAccountList, deleteAssetOfficialAccount } from "@/api/auditPagesApi/index"; import { assetOfficialAccountList, deleteAssetOfficialAccount, schema } from "@/api/auditPagesApi/index";
export default { export default {
dicts: ['zc_xtzt','zc_xtlx'], dicts: ['zc_xtzt','zc_xtlx'],
components:{myPagination}, components:{myPagination},
data() { data() {
return { return {
//
deptOptions: undefined,
defaultProps: {
children: "children",
label: "label"
},
formInline:{ formInline:{
gzhmc:"", gzhmc:"",
dwmc:"", dwmc:"",
@ -228,6 +254,7 @@ export default {
}, },
mounted(){ mounted(){
this.getList(); this.getList();
this.getDeptTree();
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce); window.addEventListener('resize', this.cancalDebounce);
}, },
@ -235,6 +262,22 @@ export default {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);
}, },
methods:{ methods:{
/** 查询部门下拉树结构 */
getDeptTree() {
schema({type:2}).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(){ getList(){
this.loading = true; this.loading = true;
@ -248,6 +291,8 @@ export default {
resetQuery(){ resetQuery(){
this.resetForm("queryForm"); this.resetForm("queryForm");
this.time = []; this.time = [];
this.formInline.deptId = undefined;
this.$refs.tree.setCurrentKey(null);
this.handleQuery(); this.handleQuery();
}, },
// //

@ -1,200 +1,226 @@
<!-- 资产管理 -- 小程序 --> <!-- 资产管理 -- 小程序 -->
<template> <template>
<div class="L-main" id="L-size-main"> <el-row :gutter="20" style="height: 100%;background-color: #F2F4F6;display: flex;">
<div class="content-search" id="L-header"> <!--部门数据-->
<div class="search-title">查询条件</div> <el-col :span="3" :xs="24" style="margin-right: 10px;height: 100%; background-color: #fff;padding-top: 20px;">
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline" label-width="100px"> <div class="head-container">
<el-row> <el-tree
<el-col :span="7"> :data="deptOptions"
<el-form-item label="所属单位:" prop="dwmc"> :props="defaultProps"
<el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input> :expand-on-click-node="false"
</el-form-item> :filter-node-method="filterNode"
</el-col> ref="tree"
<el-col :span="7"> node-key="id"
<el-form-item label="小程序名称:" prop="xcxmc"> default-expand-all
<el-input v-model="formInline.xcxmc" placeholder="请输入小程序名称"></el-input> highlight-current
</el-form-item> @node-click="handleNodeClick"
</el-col> />
<el-col :span="7">
<el-form-item label="新增时间:" prop="time">
<el-date-picker
v-model="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-col :span="3" style="text-align: right;">
<el-form-item class="unit-form">
<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-row>
<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.gzh_state"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" style="text-align: right;padding-right: 30px;">
<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>
</div> </div>
<section> </el-col>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :row-class-name="tableRowClassName" :max-height="tabHeader"> <el-col :span="20" :xs="24" style="height: 100%;flex: 1;">
<el-table-column type="index" width="50" label="序号" align="center"/> <div class="L-main" id="L-size-main">
<el-table-column label="小程序名称" key="xcxmc" prop="xcxmc" align="center"> <div class="content-search" id="L-header">
<!-- <template slot-scope="scope"> <div class="search-title">查询条件</div>
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/> <el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline" label-width="100px">
</template> --> <el-row>
</el-table-column> <el-col :span="6">
<el-table-column label="所属单位" key="ssdw" prop="ssdw" align="center" /> <el-form-item label="所属单位:" prop="dwmc">
<!-- <el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center"> <el-input v-model="formInline.dwmc" placeholder="请输入所属单位"></el-input>
</el-table-column> --> </el-form-item>
<!-- <el-table-column label="新增时间" key="createTime" prop="createTime" align="center" /> --> </el-col>
<el-table-column label="小程序状态" key="state" prop="state" class-name="table-status" align="center"> <el-col :span="6">
<template slot-scope="scope"> <el-form-item label="小程序名称:" prop="xcxmc">
<span v-if="scope.row.state == 1" style="color: #16B771;"> <el-input v-model="formInline.xcxmc" placeholder="请输入小程序名称"></el-input>
正常 </el-form-item>
</span> </el-col>
<span v-if="scope.row.state == 2" style="color: #F58A0C;"> <el-col :span="6">
注销 <el-form-item label="新增时间:" prop="time">
</span> <el-date-picker
<span v-if="scope.row.state == 3" style="color: #1485EF;"> v-model="time"
迁移 format="yyyy-MM-dd HH:mm:ss"
</span> value-format="yyyy-MM-dd HH:mm:ss"
<span v-if="scope.row.state == 4" style="color: #29A07A;"> type="datetimerange"
受限 start-placeholder="开始时间"
</span> end-placeholder="结束时间"
<span v-if="scope.row.state == 5" style="color: #F50C0C;"> placeholder="请选择"
违规 >
</span> </el-date-picker>
<span v-if="scope.row.state == 6" style="color: #F58A0C;"> </el-form-item>
未知 </el-col>
</span> <el-col :span="6" style="text-align: right;">
</template> <el-form-item class="unit-form">
</el-table-column> <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center"> <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<template slot-scope="scope"> </el-form-item>
<div style="display: flex;align-items: center;justify-content: center;"> </el-col>
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,1)"> </el-row>
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;"> <!-- <el-row>
<span class="look-info" style="color: #1485EF;margin-right: 15px;">查看</span> <el-col :span="8">
</div> <el-form-item label="小程序状态:" prop="xtzt">
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,2)"> <el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;"> <el-option
<span class="look-info" style="color: #1485EF;margin-right: 15px;">编辑</span> v-for="dict in dict.type.gzh_state"
</div> :key="dict.value"
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,3)"> :label="dict.label"
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;"> :value="dict.value">
<span class="look-info" style="color: #F50C0C;margin-right: 15px;">删除</span> </el-option>
</div> </el-select>
</div> </el-form-item>
</template> </el-col>
</el-table-column> <el-col :span="16" style="text-align: right;padding-right: 30px;">
</el-table> <el-form-item>
</section> <el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<my-pagination <el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
id="L-pagination" </el-form-item>
:total="total" </el-col>
:page="formInline.current" </el-row> -->
:limit="formInline.size" </el-form>
@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>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link>
</div> </div>
</el-upload> <main>
<div slot="footer" class="dialog-footer"> <div class="search-title">
<el-button type="primary" @click="submitFileForm"> </el-button> <span class="search-title-span">资产列表</span>
<el-button @click="upload.open = false"> </el-button> <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="xcxmc" prop="xcxmc" 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="ssdw" prop="ssdw" align="center" />
<!-- <el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
</el-table-column> -->
<!-- <el-table-column label="新增时间" key="createTime" prop="createTime" align="center" /> -->
<el-table-column label="小程序状态" key="state" prop="state" class-name="table-status" align="center">
<template slot-scope="scope">
<span v-if="scope.row.state == 1" style="color: #16B771;">
正常
</span>
<span v-if="scope.row.state == 2" style="color: #F58A0C;">
注销
</span>
<span v-if="scope.row.state == 3" style="color: #1485EF;">
迁移
</span>
<span v-if="scope.row.state == 4" style="color: #29A07A;">
受限
</span>
<span v-if="scope.row.state == 5" style="color: #F50C0C;">
违规
</span>
<span v-if="scope.row.state == 6" style="color: #F58A0C;">
未知
</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>仅允许导入xlsxlsx格式文件</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> </div>
</el-dialog> </el-col>
</div> </el-row>
</template> </template>
<script> <script>
import myPagination from "@/views/components/Pagination/index.vue" import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue" // import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { miniProgramsList, deleteMiniPrograms } from "@/api/auditPagesApi/index"; import { miniProgramsList, deleteMiniPrograms, schema } from "@/api/auditPagesApi/index";
export default { export default {
dicts: ['gzh_state'], dicts: ['gzh_state'],
components:{myPagination}, components:{myPagination},
data() { data() {
return { return {
//
deptOptions: undefined,
defaultProps: {
children: "children",
label: "label"
},
formInline:{ formInline:{
dwmc:"", dwmc:"",
xcxmc:"", xcxmc:"",
@ -227,6 +253,7 @@ export default {
}, },
mounted(){ mounted(){
this.getList(); this.getList();
this.getDeptTree();
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce); window.addEventListener('resize', this.cancalDebounce);
}, },
@ -234,6 +261,22 @@ export default {
window.removeEventListener('resize', this.cancalDebounce); window.removeEventListener('resize', this.cancalDebounce);
}, },
methods:{ methods:{
/** 查询部门下拉树结构 */
getDeptTree() {
schema({type:1}).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(){ getList(){
this.loading = true; this.loading = true;
@ -247,6 +290,8 @@ export default {
resetQuery(){ resetQuery(){
this.resetForm("queryForm"); this.resetForm("queryForm");
this.time = []; this.time = [];
this.formInline.deptId = undefined;
this.$refs.tree.setCurrentKey(null);
this.handleQuery(); this.handleQuery();
}, },
// //

@ -285,7 +285,7 @@
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;"> <img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;">
<span class="look-info" style="color: #1485EF;">编辑</span> <span class="look-info" style="color: #1485EF;">编辑</span>
</div> </div>
<div v-if="roles.includes('admin')" style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="changePassword(scope.row)"> <div v-if="roles.includes('admin') || roles.includes('common')" style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="changePassword(scope.row)">
<!-- <img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;"> --> <!-- <img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;"> -->
<i class="el-icon-refresh-right" style="width: 20px;margin-right: 5px;color: #1485EF;font-size: 20px;"></i> <i class="el-icon-refresh-right" style="width: 20px;margin-right: 5px;color: #1485EF;font-size: 20px;"></i>
<span class="look-info" style="color: #1485EF;">重置密码</span> <span class="look-info" style="color: #1485EF;">重置密码</span>

Loading…
Cancel
Save