|
@@ -87,7 +87,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { fetchList, createAdmin, dealJoin, fetchAdmin } from '@/api/join'
|
|
|
|
|
|
+import { fetchList, createAdmin, 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'
|
|
|
|
|
|
@@ -177,6 +177,7 @@ export default {
|
|
async handleUpdate({ $index, row }) {
|
|
async handleUpdate({ $index, row }) {
|
|
this.temp = Object.assign({}, row) // copy obj
|
|
this.temp = Object.assign({}, row) // copy obj
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
|
|
+ this.dialogStatus = 'update'
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$refs['dataForm'].clearValidate()
|
|
this.$refs['dataForm'].clearValidate()
|
|
})
|
|
})
|
|
@@ -190,10 +191,10 @@ export default {
|
|
},
|
|
},
|
|
async updateData() {
|
|
async updateData() {
|
|
const tempData = Object.assign({}, this.temp)
|
|
const tempData = Object.assign({}, this.temp)
|
|
- await dealJoin(tempData)
|
|
|
|
|
|
+ await createAdmin(tempData)
|
|
const rs = await fetchAdmin(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)
|
|
this.dialogFormVisible = false
|
|
this.dialogFormVisible = false
|
|
this.$notify({
|
|
this.$notify({
|
|
title: '成功',
|
|
title: '成功',
|