|
|
|
@ -3,11 +3,20 @@
|
|
|
|
|
<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-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-input
|
|
|
|
|
v-model="formInline.xtmc"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
@ -17,7 +26,8 @@
|
|
|
|
|
v-for="dict in dict.type.zc_xtlx"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -29,15 +39,23 @@
|
|
|
|
|
v-for="dict in dict.type.zc_xtzt"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="3" style="text-align: right;">
|
|
|
|
|
<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-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>
|
|
|
|
@ -54,54 +72,142 @@
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
>导出</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" :max-height="tabHeader" :row-class-name="tableRowClassName">
|
|
|
|
|
<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">
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:height="tabHeader"
|
|
|
|
|
:max-height="tabHeader"
|
|
|
|
|
:row-class-name="tableRowClassName"
|
|
|
|
|
>
|
|
|
|
|
<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">
|
|
|
|
|
<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">
|
|
|
|
|
<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 v-if="scope.row.xtzt == 1" style="color: #16b771">
|
|
|
|
|
已安装
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 2" style="color: #F58A0C;">
|
|
|
|
|
<span v-if="scope.row.xtzt == 2" style="color: #f58a0c">
|
|
|
|
|
测试中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 3" style="color: #1485EF;">
|
|
|
|
|
<span v-if="scope.row.xtzt == 3" style="color: #1485ef">
|
|
|
|
|
使用中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 4" style="color: #29A07A;">
|
|
|
|
|
<span v-if="scope.row.xtzt == 4" style="color: #29a07a">
|
|
|
|
|
维护中
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="scope.row.xtzt == 5" style="color: #F50C0C;">
|
|
|
|
|
<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">
|
|
|
|
|
<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;">查看</span>
|
|
|
|
|
<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">查看</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="!scope.row.auditState || scope.row.auditState == 2 || scope.row.xtzt == '5'" style="display: flex;align-items: center;cursor: pointer;margin-left: 10px;" @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
|
|
|
|
|
v-if="
|
|
|
|
|
!scope.row.auditState ||
|
|
|
|
|
scope.row.auditState == 2 ||
|
|
|
|
|
scope.row.xtzt == '5'
|
|
|
|
|
"
|
|
|
|
|
style="
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
"
|
|
|
|
|
@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>
|
|
|
|
@ -120,11 +226,11 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<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 { assetUnit, deleteAssetInfo } from "@/api/auditPagesApi/index";
|
|
|
|
|
export default {
|
|
|
|
|
dicts: ['zc_xtzt','zc_xtlx'],
|
|
|
|
|
dicts: ["zc_xtzt", "zc_xtlx"],
|
|
|
|
|
components: { myPagination },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -139,31 +245,31 @@ export default {
|
|
|
|
|
tableData: [],
|
|
|
|
|
loading: false,
|
|
|
|
|
tabHeader: undefined,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
if (Object.keys(this.$route.params).length != 0) {
|
|
|
|
|
this.formInline = this.$route.params;
|
|
|
|
|
} else {
|
|
|
|
|
this.formInline.current = 1
|
|
|
|
|
this.formInline.size = 20
|
|
|
|
|
this.formInline.current = 1;
|
|
|
|
|
this.formInline.size = 20;
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
window.addEventListener("resize", this.cancalDebounce);
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
|
window.removeEventListener("resize", this.cancalDebounce);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 获取列表
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
assetUnit('get',this.formInline).then(res=>{
|
|
|
|
|
assetUnit("get", this.formInline).then((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
this.tableData = res.data.records;
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 重置
|
|
|
|
|
resetQuery() {
|
|
|
|
@ -185,38 +291,56 @@ export default {
|
|
|
|
|
handleImport() {},
|
|
|
|
|
// 导出
|
|
|
|
|
handleExport() {
|
|
|
|
|
this.download('/tc/assetCurrent/export', {
|
|
|
|
|
...this.formInline
|
|
|
|
|
}, `asset_${new Date().getTime()}.xlsx`)
|
|
|
|
|
this.download(
|
|
|
|
|
"/tc/assetCurrent/export",
|
|
|
|
|
{
|
|
|
|
|
...this.formInline,
|
|
|
|
|
},
|
|
|
|
|
`asset_${new Date().getTime()}.xlsx`
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
// 新增资产
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: "myAssetsAuth",
|
|
|
|
|
query: {
|
|
|
|
|
pageType: "add",
|
|
|
|
|
type: 0,
|
|
|
|
|
queryData: this.formInline,
|
|
|
|
|
name: "MyWebAssets",
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 查看详情
|
|
|
|
|
goInfo(row, id) {
|
|
|
|
|
this.$router.push({name: 'myAssetsAuth',query: {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: "myAssetsAuth",
|
|
|
|
|
query: {
|
|
|
|
|
pageType: id == 1 ? "look" : "change",
|
|
|
|
|
type: 0,
|
|
|
|
|
id: row.id,
|
|
|
|
|
queryData: this.formInline,
|
|
|
|
|
name:"MyWebAssets"
|
|
|
|
|
}})
|
|
|
|
|
name: "MyWebAssets",
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 修改table背景色
|
|
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
|
|
if (rowIndex % 2 !== 0) {
|
|
|
|
|
return 'evenNumber-row';
|
|
|
|
|
return "evenNumber-row";
|
|
|
|
|
}
|
|
|
|
|
return '';
|
|
|
|
|
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 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 - 120;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|