|
@@ -50,26 +50,46 @@
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="Actions" width="190" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column align="center" label="Actions" width="300" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
- <router-link :to="'/join/edit/'+scope.row.id">
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-edit">
|
|
|
- 查看
|
|
|
+ <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="info" size="mini" icon="el-icon-s-check" :disabled="scope.row.status == '1' ? true : false" @click="handleUpdate(scope)">
|
|
|
+ {{ scope.row.status == '1' ? '已处理' : '处理' }}
|
|
|
</el-button>
|
|
|
- </router-link>
|
|
|
- <el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px;" @click="handleDelete(scope)">
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
+ <!--<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px;" @click="handleDelete(scope)">
|
|
|
+ 删除
|
|
|
+ </el-button>-->
|
|
|
+ </el-row>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
|
+ <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-item label="备注" prop="mark">
|
|
|
+ <el-input v-model="temp.mark" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormVisible = false">
|
|
|
+ 取消
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="updateData()">
|
|
|
+ 确定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { fetchList, deleteJoin } from '@/api/join'
|
|
|
+import { fetchList, deleteJoin, dealJoin, fetchJoin } from '@/api/join'
|
|
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
|
|
import waves from '@/directive/waves'
|
|
|
|
|
@@ -103,7 +123,12 @@ export default {
|
|
|
listQuery: {
|
|
|
page: 1,
|
|
|
pageSize: 10
|
|
|
- }
|
|
|
+ },
|
|
|
+ temp: {
|
|
|
+ id: undefined,
|
|
|
+ mark: ''
|
|
|
+ },
|
|
|
+ dialogFormVisible: false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -141,6 +166,27 @@ export default {
|
|
|
message: '隐藏成功'
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ async handleUpdate({ $index, row }) {
|
|
|
+ this.temp = Object.assign({}, row) // copy obj
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs['dataForm'].clearValidate()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async updateData() {
|
|
|
+ const tempData = Object.assign({}, this.temp)
|
|
|
+ await dealJoin(tempData)
|
|
|
+ const rs = await fetchJoin(tempData.id)
|
|
|
+ const index = this.list.findIndex(v => v.id === this.temp.id)
|
|
|
+ this.list.splice(index, 1, rs.data.info)
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '更新成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|