项目使用能力列表修改

This commit is contained in:
kongjun 2022-06-24 10:30:09 +08:00
parent 7f04ce7976
commit 5ac149fc62
1 changed files with 31 additions and 80 deletions

View File

@ -1,24 +1,28 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-bscatalogue__bscatalogue"> <div class="mod-bscatalogue__bscatalogue">
<el-form :inline="true"> <el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item label="项目名称:"> <el-form-item label="项目名称:">
<el-input <el-input
v-model="queryData.projectName" v-model="dataForm.projectName"
placeholder="请输入项目名称" placeholder="请输入项目名称"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="应用名称:"> <el-form-item label="应用名称:">
<el-input <el-input
v-model="queryData.resourceName" v-model="dataForm.resourceName"
placeholder="请输入应用名称" placeholder="请输入应用名称"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="searchTableData">查询</el-button> <el-button type="primary" @click="getDataList()">查询</el-button>
<el-button @click="resetTableData">重置</el-button> <el-button @click="reset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table row-key="id" :data="dataList" border style="width: 100%"> <el-table row-key="id" :data="dataList" border style="width: 100%">
@ -58,14 +62,13 @@
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<el-pagination <el-pagination
style="margin-top: 20px; text-align: right" :current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryData.pageIndex"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="queryData.pageSize" :page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="queryData.total" @size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
> >
</el-pagination> </el-pagination>
</div> </div>
@ -73,90 +76,38 @@
</template> </template>
<script> <script>
//import mixinViewModule from "@/mixins/view-module"; import mixinViewModule from "@/mixins/view-module";
// import AddOrUpdate from './order-add-or-update' // import AddOrUpdate from './order-add-or-update'
import { addDynamicRoute } from "@/router"; import { addDynamicRoute } from "@/router";
export default { export default {
// mixins: [mixinViewModule], mixins: [mixinViewModule],
data() { data() {
return { return {
queryData: { mixinViewModuleOptions: {
getDataListURL: "/projectuse/page",
getDataListIsPage: true,
deleteURL: "",
deleteIsBatch: false,
},
dataForm: {
projectName: "", projectName: "",
resourceName: "", resourceName: "",
pageIndex: 1,
pageSize: 10,
total: 0,
}, },
/* dataList: [
{
projectName: "",
resourceName: "",
abilityName: "",
abilityType: "",
browseNum: "",
},
], */
}; };
}, },
components: { components: {
// AddOrUpdate // AddOrUpdate
}, },
mounted() { mounted() {},
this.getTableData();
},
methods: { methods: {
getTableData() {
//
this.$http
.get("/projectuse/page", {
params: {
page: this.queryData.pageIndex,
limit: this.queryData.pageSize,
projectName: this.queryData.projectName,
resourceName: this.queryData.applyName,
},
})
.then((res) => {
console.log("uuurrrr", res);
if (res.data && res.data.list) {
this.dataList = res.data.list;
this.queryData.total = parseInt(res.data.total);
}
})
.catch(() => {});
},
getStatusCnName(val) {
const arr = this.statusOptions.filter((i) => {
return i.value === val;
});
if (arr.length >= 0) {
return arr[0].label;
}
return "未知状态";
},
// //
resetTableData() { reset() {
this.queryData.projectName = ""; this.dataForm = {
this.queryData.resourceName = ""; projectName: "",
this.getTableData(); resourceName: "",
}, };
this.page = 1; //
searchTableData() { this.query();
this.queryData.pageIndex = 1;
this.getTableData();
},
//
handleSizeChange(value) {
this.queryData.pageSize = value;
this.getTableData();
},
//
handleCurrentChange(val) {
this.queryData.pageIndex = val;
this.getTableData();
}, },
}, },
}; };