|
@@ -29,19 +29,19 @@
|
|
|
</el-row>
|
|
|
<el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="项目名称" align="center" prop="projectName" />
|
|
|
+ <el-table-column label="项目名称" align="center" prop="projectName" width="230" />
|
|
|
<el-table-column label="项目编号" align="center" prop="num" />
|
|
|
- <el-table-column label="项目周期" align="center">
|
|
|
+ <el-table-column label="项目周期" align="center" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.sData }}至{{ scope.row.eData }}</span>
|
|
|
+ <span>{{ scope.row.startDate }} 至 {{ scope.row.finishDate }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="服务公司" align="center">
|
|
|
+ <el-table-column label="服务公司" align="center" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<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">
|
|
|
+ <el-table-column label="接包人数" align="center" prop="peoples" width="110">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="omit">{{ scope.row.peoples || 0 }}</div>
|
|
|
</template>
|
|
@@ -51,14 +51,15 @@
|
|
|
<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="ty" v-else>禁用</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">
|
|
|
+ <el-table-column label="操作" align="center" width="250" fixed="right">
|
|
|
<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-s-goods" @click="op('packages', scope.row)" v-hasPermi="['work:project:list']">接包明细</el-button>
|
|
|
+ <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>
|
|
@@ -73,6 +74,7 @@
|
|
|
|
|
|
<script>
|
|
|
import edit from './edit';
|
|
|
+import packages from './packages/index.vue';
|
|
|
export default {
|
|
|
name: 'Project',
|
|
|
data() {
|
|
@@ -123,12 +125,32 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
const id = row.id || this.ids[0];
|
|
|
+ if (tag == 'packages') {
|
|
|
+ this.iframe({ obj: packages, param: { projectId: row.id }, title: '接包明细', width: '65%', height: '75%' });
|
|
|
+ }
|
|
|
if (tag == 'detail') {
|
|
|
this.iframe({ obj: edit, param: { id: id, detail: true }, title: '项目详情', width: '55%', height: '55%' });
|
|
|
}
|
|
|
if (tag == 'edit') {
|
|
|
this.iframe({ obj: edit, param: { id: id }, title: '编辑项目', width: '55%', height: '55%' });
|
|
|
}
|
|
|
+ //账号状态
|
|
|
+ if (tag == 'change') {
|
|
|
+ let text = row.state === 0 ? '发布' : '停用';
|
|
|
+ this.$confirm('确认要' + text + '该项目吗?', '警告', { type: 'warning' })
|
|
|
+ .then(() => {
|
|
|
+ this.post({ url: '/work/project/edit', data: { id: row.id, state: row.state } })
|
|
|
+ .then((response) => {
|
|
|
+ this.$modal.msgSuccess(text + '成功');
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ row.state = row.state === 0 ? 1 : 0;
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ row.state = row.state === 0 ? 1 : 0;
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
del(row) {
|
|
|
this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
|