You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TcAssetVerificationPc/src/views/unitPages/myAssets/mobileApplication.vue

228 lines
8.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!-- 资产管理 -- 移动应用系统 -->
<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="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="yymc">
<el-input v-model="formInline.yymc" placeholder="请输入移动应用名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="icp备案状态" prop="xtzt">
<el-select v-model="formInline.xtzt" placeholder="请选择icp备案状态">
<el-option
v-for="dict in dict.type.app_icp_state"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</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="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</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>
</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>
</div>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue"
import { assetAppList, deleteAssetApp } from "@/api/auditPagesApi/index";
export default {
dicts: ['zc_xtzt','zc_xtlx', 'app_icp_state'],
components:{myPagination},
data() {
return {
formInline:{
xtzt:"",
yymc:"",
// startTime:"",
// endTime:"",
current:1,
size:10,
},
// time:[],
total:0,
tableData:[],
loading:false,
tabHeader: undefined,
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
// 获取列表
getList(){
this.loading = true;
assetAppList(this.formInline).then(res=>{
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
})
},
// 重置
resetQuery(){
this.resetForm("queryForm");
this.time = [];
this.handleQuery();
},
// 查询
handleQuery(){
this.formInline.current = 1;
// if(this.time) {
// this.formInline.startTime = this.time[0]
// this.formInline.endTime = this.time[1]
// }
this.getList();
},
// 页码获取
getPagination(pages){
this.formInline.current = pages.page;
this.formInline.size = pages.limit;
this.getList();
},
// 导出
handleExport(){
this.download('/tc/assetApp/export', {
...this.formInline
}, `移动应用程序资产${new Date().getTime()}.xlsx`)
},
// 查看详情
goInfo(row,id){
this.$router.push({name: 'myAssetsAuth',query: {
pageType: id == 1 ? "look" : "change",
type:4,
id:row.id
}})
},
// 修改table背景色
tableRowClassName({row, rowIndex}){
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
// 屏幕尺寸变化
cancalDebounce(){
const element = document.getElementById('L-size-main'); // 通过元素的 ID 获取元素
const header = document.getElementById('L-header'); // 通过元素的 ID 获取元素
const pagination = document.getElementById('L-pagination'); // 通过元素的 ID 获取元素
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 110;
}
},
}
</script>