|
@@ -163,6 +163,7 @@
|
|
|
</div>
|
|
|
<div class="cla">
|
|
|
<el-table :data="uptataKey" fit style="width: 100%;">
|
|
|
+ <el-table-column type="index" width="50" />
|
|
|
<el-table-column label="" min-width="150">
|
|
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
|
|
</el-table-column>
|
|
@@ -170,14 +171,14 @@
|
|
|
<template slot-scope="scope"><a :href="scope.row.url" style="color:blue;">{{ scope.row.url }}</a></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column fixed="right" label="" width="50" align="center">
|
|
|
- <!-- <template slot-scope="scope"> -->
|
|
|
- <el-button class="deleteSty" @click="createFormData(form, 2)"> x </el-button>
|
|
|
- <!-- </template> -->
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button class="deleteSty" @click="handleDelContractList(scope.row)"> x </el-button>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<el-form-item class="submit">
|
|
|
- <el-button :disabled="dis" size="mini" type="primary" @click="createFormData(form, 1)">提 交</el-button>
|
|
|
+ <el-button :disabled="dis" size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
|
|
|
<el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -391,36 +392,30 @@ export default {
|
|
|
}
|
|
|
}))
|
|
|
},
|
|
|
+ handleDelContractList(index) {
|
|
|
+ console.log(index)
|
|
|
+ this.uptataKey.splice(index, 1)
|
|
|
+ },
|
|
|
// 提交表单并且返回刷新
|
|
|
- createFormData(form, e) {
|
|
|
- if (e === 1) {
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- if (form.assigner) {
|
|
|
- form.assigner = form.assigner.join(',')
|
|
|
- }
|
|
|
- if (form.currentHandler) {
|
|
|
- form.currentHandler = form.currentHandler.join(',')
|
|
|
- }
|
|
|
- form.reopenTimes = parseInt(form.reopenTimes)
|
|
|
- form.accessory = this.accessory
|
|
|
- this.userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
- this.objData = { bugBaseInfo: form, user: this.userData }
|
|
|
- bugUpdate(this.objData).then(res => {
|
|
|
- res.code === 200 ? this.successFun() : this.errorFun()
|
|
|
- this.$router.go(-1)
|
|
|
- })
|
|
|
+ createFormData(form) {
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (form.assigner) {
|
|
|
+ form.assigner = form.assigner.join(',')
|
|
|
}
|
|
|
- })
|
|
|
- } else {
|
|
|
- form.accessory = this.accessory
|
|
|
- this.userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
- this.objData = { bugBaseInfo: form, user: this.userData }
|
|
|
- bugUpdate(this.objData).then(res => {
|
|
|
- res.code === 200 ? this.successFun() : this.errorFun()
|
|
|
- this.$router.go(-1)
|
|
|
- })
|
|
|
- }
|
|
|
+ if (form.currentHandler) {
|
|
|
+ form.currentHandler = form.currentHandler.join(',')
|
|
|
+ }
|
|
|
+ form.reopenTimes = parseInt(form.reopenTimes)
|
|
|
+ form.accessory = this.accessory
|
|
|
+ this.userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
+ this.objData = { bugBaseInfo: form, user: this.userData }
|
|
|
+ bugUpdate(this.objData).then(res => {
|
|
|
+ res.code === 200 ? this.successFun() : this.errorFun()
|
|
|
+ this.$router.go(-1)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
successFun() {
|
|
|
this.$notify({ title: 'Success', message: 'Updated Successfully', type: 'success', duration: 2000 })
|