|
@@ -1,10 +1,13 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
- <el-input v-model="listQuery.mobile" placeholder="手机号" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter" />
|
|
|
|
|
|
+ <el-input v-model="listQuery.name" placeholder="名称" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter" />
|
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">
|
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">
|
|
搜索
|
|
搜索
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button v-waves class="filter-item" type="primary" @click="handleCreate()">
|
|
|
|
+ 新建
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
|
|
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
|
|
<el-table-column align="center" label="ID" width="80">
|
|
<el-table-column align="center" label="ID" width="80">
|
|
@@ -13,53 +16,36 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column width="180px" align="center" label="申请日期">
|
|
|
|
|
|
+ <el-table-column align="center" label="创建日期">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.create_time }}</span>
|
|
<span>{{ scope.row.create_time }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column class-name="status-col" label="手机号" width="180px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ scope.row.mobile }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column class-name="status-col" label="申请人姓名" width="100px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ scope.row.name }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column class-name="status-col" label="商务对接人" width="100px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ scope.row.meet_people }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column class-name="status-col" label="投资金额" width="100px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ scope.row.investment_money }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column class-name="status-col" label="沪上阿姨了解情况">
|
|
|
|
|
|
+ <el-table-column class-name="status-col" label="名称" >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{ scope.row.sub_ayi }}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.account }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column class-name="status-col" label="状态" width="80px">
|
|
|
|
|
|
+ <el-table-column class-name="status-col" label="角色" >
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <el-tag :type="row.status | statusFilter">
|
|
|
|
- {{ row.status | statusFilterTxt }}
|
|
|
|
- </el-tag>
|
|
|
|
|
|
+ <span>{{ row.role_id | roleFilter }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="center" label="Actions" width="300" class-name="small-padding fixed-width">
|
|
|
|
|
|
+<!-- <el-table-column class-name="status-col" label="状态">-->
|
|
|
|
+<!-- <template slot-scope="{row}">-->
|
|
|
|
+<!-- <el-tag :type="row.status | statusFilter">-->
|
|
|
|
+<!-- {{ row.status | statusFilterTxt }}-->
|
|
|
|
+<!-- </el-tag>-->
|
|
|
|
+<!-- </template>-->
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
+ <el-table-column align="center" label="Actions" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-row>
|
|
<el-row>
|
|
- <router-link :to="'/join/edit/'+scope.row.id">
|
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-edit" style="margin-right: 10px;">
|
|
|
|
- 查看
|
|
|
|
- </el-button>
|
|
|
|
- </router-link>
|
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-s-check" :disabled="(scope.row.status === 1 || scope.row.status === 3)" @click="handleUpdate(scope)">
|
|
|
|
- {{ scope.row.status === 1 || scope.row.status === 3 ? '已处理' : '处理' }}
|
|
|
|
|
|
+<!-- <el-button type="primary" size="mini" icon="el-icon-edit" style="margin-right: 10px;" @click="handleUpdate(scope)">-->
|
|
|
|
+<!-- 查看-->
|
|
|
|
+<!-- </el-button>-->
|
|
|
|
+ <el-button type="primary" size="mini" :disabled="(scope.row.status === 1 || scope.row.status === 3)" @click="handleUpdate(scope)">
|
|
|
|
+ 修改
|
|
</el-button>
|
|
</el-button>
|
|
<!--<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px;" @click="handleDelete(scope)">
|
|
<!--<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px;" @click="handleDelete(scope)">
|
|
删除
|
|
删除
|
|
@@ -72,14 +58,18 @@
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
<el-dialog title="处理" :visible.sync="dialogFormVisible">
|
|
<el-dialog title="处理" :visible.sync="dialogFormVisible">
|
|
<el-form ref="dataForm" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
|
|
<el-form ref="dataForm" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
|
|
- <el-form-item label="理由" prop="mark">
|
|
|
|
- <el-input v-model="temp.mark" />
|
|
|
|
|
|
+ <el-form-item label="名称" prop="account">
|
|
|
|
+ <el-input v-model="temp.account" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="处理意见" prop="mark">
|
|
|
|
|
|
+
|
|
|
|
+ <el-form-item label="密码" prop="passwd">
|
|
|
|
+ <el-input v-model="temp.passwd" ref="password" show-password />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="权限" prop="role_id">
|
|
<template>
|
|
<template>
|
|
- <el-radio-group v-model="temp.status">
|
|
|
|
- <el-radio :label="1">同意</el-radio>
|
|
|
|
- <el-radio :label="3">拒绝</el-radio>
|
|
|
|
|
|
+ <el-radio-group v-model="temp.role_id">
|
|
|
|
+ <el-radio :label="1">超级管理员</el-radio>
|
|
|
|
+ <el-radio :label="2">日志查看员</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</template>
|
|
</template>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -88,7 +78,7 @@
|
|
<el-button @click="dialogFormVisible = false">
|
|
<el-button @click="dialogFormVisible = false">
|
|
取消
|
|
取消
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="primary" @click="updateData()">
|
|
|
|
|
|
+ <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">
|
|
确定
|
|
确定
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -97,7 +87,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { fetchList, deleteJoin, dealJoin, fetchJoin } from '@/api/join'
|
|
|
|
|
|
+import { fetchList, createAdmin, dealJoin, fetchAdmin } from '@/api/join'
|
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
|
import waves from '@/directive/waves'
|
|
import waves from '@/directive/waves'
|
|
|
|
|
|
@@ -122,12 +112,10 @@ export default {
|
|
2: '删除'
|
|
2: '删除'
|
|
}
|
|
}
|
|
return statusMap[status]
|
|
return statusMap[status]
|
|
- },
|
|
|
|
- positionFilter(status) {
|
|
|
|
|
|
+ }, roleFilter(status) {
|
|
const statusMap = {
|
|
const statusMap = {
|
|
- 'HOME': 'success',
|
|
|
|
- draft: 'info',
|
|
|
|
- 2: 'danger'
|
|
|
|
|
|
+ 1: '超级管理员',
|
|
|
|
+ 2: '日志查看员'
|
|
}
|
|
}
|
|
return statusMap[status]
|
|
return statusMap[status]
|
|
}
|
|
}
|
|
@@ -143,8 +131,9 @@ export default {
|
|
},
|
|
},
|
|
temp: {
|
|
temp: {
|
|
id: undefined,
|
|
id: undefined,
|
|
- mark: '',
|
|
|
|
- status: ''
|
|
|
|
|
|
+ account: '',
|
|
|
|
+ passwd: '',
|
|
|
|
+ role_id: 1
|
|
},
|
|
},
|
|
dialogFormVisible: false
|
|
dialogFormVisible: false
|
|
}
|
|
}
|
|
@@ -192,10 +181,17 @@ export default {
|
|
this.$refs['dataForm'].clearValidate()
|
|
this.$refs['dataForm'].clearValidate()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ handleCreate() {
|
|
|
|
+ this.dialogStatus = 'create'
|
|
|
|
+ this.dialogFormVisible = true
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs['dataForm'].clearValidate()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
async updateData() {
|
|
async updateData() {
|
|
const tempData = Object.assign({}, this.temp)
|
|
const tempData = Object.assign({}, this.temp)
|
|
await dealJoin(tempData)
|
|
await dealJoin(tempData)
|
|
- const rs = await fetchJoin(tempData.id)
|
|
|
|
|
|
+ const rs = await fetchAdmin(tempData.id)
|
|
const index = this.list.findIndex(v => v.id === this.temp.id)
|
|
const index = this.list.findIndex(v => v.id === this.temp.id)
|
|
this.list.splice(index, 1, rs.data.info)
|
|
this.list.splice(index, 1, rs.data.info)
|
|
this.dialogFormVisible = false
|
|
this.dialogFormVisible = false
|
|
@@ -205,6 +201,20 @@ export default {
|
|
type: 'success',
|
|
type: 'success',
|
|
duration: 2000
|
|
duration: 2000
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ async createData() {
|
|
|
|
+ createAdmin(this.temp).then((rs) => {
|
|
|
|
+ fetchAdmin(rs.data.addId).then(res => {
|
|
|
|
+ this.list.unshift(res.data)
|
|
|
|
+ this.dialogFormVisible = false
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '创建成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|