|
@@ -3,21 +3,31 @@
|
|
<!-- 顶部操作区 -->
|
|
<!-- 顶部操作区 -->
|
|
<div class="operation-area">
|
|
<div class="operation-area">
|
|
<el-button type="primary" @click="handleAdd">新建工程类别</el-button>
|
|
<el-button type="primary" @click="handleAdd">新建工程类别</el-button>
|
|
- <el-input
|
|
|
|
- v-model="searchQuery"
|
|
|
|
- placeholder="请输入工程类别编号或名称"
|
|
|
|
- style="width: 200px; margin-left: 16px"
|
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
|
- >
|
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button>
|
|
|
|
- </el-input>
|
|
|
|
|
|
+
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
+ <el-form-item label="用户名称" prop="userName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.wkNo"
|
|
|
|
+ placeholder="请输入工程类别编号或名称"
|
|
|
|
+ style="width: 200px; margin-left: 16px"
|
|
|
|
+ @keyup.enter.native="handleSearch"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 表格区域 -->
|
|
<!-- 表格区域 -->
|
|
- <el-table :data="tableData" style="width: 100%; margin-top: 20px">
|
|
|
|
- <el-table-column prop="projectCode" label="工程类别编号" width="180"></el-table-column>
|
|
|
|
- <el-table-column prop="projectName" label="工程类别名称" width="180"></el-table-column>
|
|
|
|
- <el-table-column prop="remark" label="备注"></el-table-column>
|
|
|
|
|
|
+ <el-table :data="tableData" style="width: 100%; margin-top: 20px" id="worksCategoryList">
|
|
|
|
+ <el-table-column prop="wkNo" label="工程类别编号" width="180"></el-table-column>
|
|
|
|
+ <el-table-column prop="wkName" label="工程类别名称" width="180"></el-table-column>
|
|
|
|
+ <el-table-column prop="wkRemark" label="备注"></el-table-column>
|
|
<el-table-column prop="productCount" label="产品数" width="120"></el-table-column>
|
|
<el-table-column prop="productCount" label="产品数" width="120"></el-table-column>
|
|
<el-table-column label="操作" width="250">
|
|
<el-table-column label="操作" width="250">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -27,7 +37,7 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
<el-pagination
|
|
<el-pagination
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
@@ -40,18 +50,18 @@
|
|
style="margin-top: 20px; text-align: right"
|
|
style="margin-top: 20px; text-align: right"
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 新增/编辑对话框 -->
|
|
<!-- 新增/编辑对话框 -->
|
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px">
|
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px">
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="120px">
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="120px">
|
|
- <el-form-item label="工程类别编号" prop="projectCode">
|
|
|
|
- <el-input v-model="form.projectCode"></el-input>
|
|
|
|
|
|
+ <el-form-item label="工程类别编号" prop="wkNo">
|
|
|
|
+ <el-input v-model="form.wkNo"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="工程类别名称" prop="projectName">
|
|
|
|
- <el-input v-model="form.projectName"></el-input>
|
|
|
|
|
|
+ <el-form-item label="工程类别名称" prop="wkName">
|
|
|
|
+ <el-input v-model="form.wkName"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="备注" prop="remark">
|
|
|
|
- <el-input type="textarea" v-model="form.remark"></el-input>
|
|
|
|
|
|
+ <el-form-item label="备注" prop="wkRemark">
|
|
|
|
+ <el-input type="textarea" v-model="form.wkRemark"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
@@ -61,10 +71,11 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
|
|
+
|
|
<script>
|
|
<script>
|
|
|
|
|
|
- import { addWorkCategory } from "@/api/worksCategory/worksCategory";
|
|
|
|
|
|
+ import { addWork, addWorkCategory, listWork } from '@/api/worksCategory/worksCategory'
|
|
|
|
+ import { listNotice } from '@/api/system/notice'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -72,31 +83,36 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
searchQuery: '',
|
|
searchQuery: '',
|
|
- tableData: [
|
|
|
|
- {
|
|
|
|
- projectCode: 'ysp',
|
|
|
|
- projectName: '音视频',
|
|
|
|
- remark: '',
|
|
|
|
- productCount: 5
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ userList: null,
|
|
|
|
+ tableData: [], // 表格数据
|
|
pagination: {
|
|
pagination: {
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
total: 1
|
|
total: 1
|
|
},
|
|
},
|
|
|
|
+ // 查询参数
|
|
|
|
+ queryParams: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ userName: undefined,
|
|
|
|
+ phonenumber: undefined,
|
|
|
|
+ status: undefined,
|
|
|
|
+ deptId: undefined
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
dialogTitle: '',
|
|
dialogTitle: '',
|
|
form: {
|
|
form: {
|
|
- projectCode: '',
|
|
|
|
- projectName: '',
|
|
|
|
- remark: ''
|
|
|
|
|
|
+ wkNo: '',
|
|
|
|
+ wkName: '',
|
|
|
|
+ wkRemark: ''
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- projectCode: [
|
|
|
|
|
|
+ wkNo: [
|
|
{ required: true, message: '请输入工程类别编号', trigger: 'blur' }
|
|
{ required: true, message: '请输入工程类别编号', trigger: 'blur' }
|
|
],
|
|
],
|
|
- projectName: [
|
|
|
|
|
|
+ wkName: [
|
|
{ required: true, message: '请输入工程类别名称', trigger: 'blur' }
|
|
{ required: true, message: '请输入工程类别名称', trigger: 'blur' }
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -111,9 +127,9 @@
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.dialogTitle = '新增工程类别'
|
|
this.dialogTitle = '新增工程类别'
|
|
this.form = {
|
|
this.form = {
|
|
- projectCode: '',
|
|
|
|
- projectName: '',
|
|
|
|
- remark: ''
|
|
|
|
|
|
+ wkNo: '',
|
|
|
|
+ wkName: '',
|
|
|
|
+ wkRemark: ''
|
|
}
|
|
}
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
},
|
|
},
|
|
@@ -153,7 +169,7 @@
|
|
if (this.form.userId != undefined) {
|
|
if (this.form.userId != undefined) {
|
|
}else{
|
|
}else{
|
|
|
|
|
|
- addWorkCategory(this.form).then(response => {
|
|
|
|
|
|
+ addWork(this.form).then(response => {
|
|
debugger;
|
|
debugger;
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
@@ -171,7 +187,14 @@
|
|
},
|
|
},
|
|
loadData() {
|
|
loadData() {
|
|
// 实现数据加载逻辑
|
|
// 实现数据加载逻辑
|
|
- console.log('加载数据,当前页:', this.pagination.currentPage, '每页数量:', this.pagination.pageSize)
|
|
|
|
|
|
+ this.loading = true;
|
|
|
|
+ listWork(this.searchQuery).then(response => {
|
|
|
|
+ debugger;
|
|
|
|
+ this.tableData = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -179,7 +202,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
-
|
|
|
|
|
|
+
|
|
<style scoped>
|
|
<style scoped>
|
|
.project-category-container {
|
|
.project-category-container {
|
|
padding: 20px;
|
|
padding: 20px;
|
|
@@ -188,4 +211,4 @@
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
- </style>
|
|
|
|
|
|
+ </style>
|