|
@@ -2,13 +2,19 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent v-show="showSearch" label-width="auto">
|
|
|
<el-form-item label="项目名称" prop="projectName">
|
|
|
- <el-input v-model="queryParams.projectName" placeholder="请输入项目名称" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
+ <el-input v-model="queryParams.projectName" placeholder="请输入项目名称" @keyup.enter.native="handleQuery" clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="项目编号" prop="num">
|
|
|
- <el-input v-model="queryParams.num" placeholder="请输入项目编号" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
+ <el-input v-model="queryParams.num" placeholder="请输入项目编号" @keyup.enter.native="handleQuery" class="inp" clearable />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="状态" prop="state">
|
|
|
- <el-input v-model="queryParams.state" placeholder="请输入状态" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
+ <el-form-item label="项目状态" prop="state">
|
|
|
+ <el-select v-model="queryParams.state" placeholder="充值状态" clearable style="width: 117px">
|
|
|
+ <el-option value="0" label="启用"></el-option>
|
|
|
+ <el-option value="1" label="禁用"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="发包日期">
|
|
|
+ <el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
@@ -32,22 +38,27 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="服务公司" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <div class="omit">{{ scope.row.serviceCompany }}</div>
|
|
|
+ <div class="omit" :title="scope.row.serviceCompany">{{ scope.row.serviceCompany }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="接包人数" align="center" prop="peoples" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="omit">{{ scope.row.peoples || 0 }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="接包人数" align="center" prop="peoples" width="120" />
|
|
|
<el-table-column label="发包日期" align="center" prop="createTime" />
|
|
|
<el-table-column label="项目状态" align="center" prop="state" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="switch">
|
|
|
<el-switch v-model="scope.row.state" :active-value="0" :width="50" :inactive-value="1" @change="op('change', scope.row)"></el-switch>
|
|
|
- <span class="zc" v-if="scope.row.state == 0">正常</span>
|
|
|
+ <span class="zc" v-if="scope.row.state == 0">启用</span>
|
|
|
<span class="ty" v-else>禁用</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)" v-hasPermi="['work:project:list']">查看</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:project:edit']">修改</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:project:remove']">删除</el-button>
|
|
|
</template>
|
|
@@ -69,20 +80,12 @@ export default {
|
|
|
ids: [],
|
|
|
showSearch: true,
|
|
|
response: {},
|
|
|
+ dateRange: [],
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- companyId: null,
|
|
|
projectName: null,
|
|
|
- projectType: null,
|
|
|
num: null,
|
|
|
- contents: null,
|
|
|
- serviceCompany: null,
|
|
|
- sData: null,
|
|
|
- eData: null,
|
|
|
- bData: null,
|
|
|
- peoples: null,
|
|
|
- top: null,
|
|
|
state: null,
|
|
|
orderByColumn: 'id',
|
|
|
isAsc: 'desc'
|
|
@@ -94,6 +97,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
+ if (this.dateRange) {
|
|
|
+ this.queryParams.dateBegin = this.dateRange[0];
|
|
|
+ this.queryParams.dateEnd = this.dateRange[1];
|
|
|
+ }
|
|
|
this.ajax({ url: '/work/project/list', data: this.queryParams }).then((response) => {
|
|
|
this.response = response;
|
|
|
});
|
|
@@ -104,6 +111,7 @@ export default {
|
|
|
},
|
|
|
resetQuery() {
|
|
|
this.resetForm('queryForm');
|
|
|
+ this.dateRange = [];
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
selects(rows) {
|
|
@@ -111,11 +119,15 @@ export default {
|
|
|
},
|
|
|
op(tag, row) {
|
|
|
if (tag == 'add') {
|
|
|
- this.iframe({ obj: edit, param: {}, title: '新增项目', width: '60%', height: '70%' });
|
|
|
+ this.iframe({ obj: edit, param: {}, title: '新增项目', width: '55%', height: '55%' });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const id = row.id || this.ids[0];
|
|
|
+ if (tag == 'detail') {
|
|
|
+ this.iframe({ obj: edit, param: { id: id, detail: true }, title: '项目详情', width: '55%', height: '55%' });
|
|
|
}
|
|
|
if (tag == 'edit') {
|
|
|
- const id = row.id || this.ids[0];
|
|
|
- this.iframe({ obj: edit, param: { id: id }, title: '编辑项目', width: '60%', height: '70%' });
|
|
|
+ this.iframe({ obj: edit, param: { id: id }, title: '编辑项目', width: '55%', height: '55%' });
|
|
|
}
|
|
|
},
|
|
|
del(row) {
|