master
xy 3 years ago
parent 5eafcdcbba
commit d5ef591186

@ -28,7 +28,7 @@
</template> </template>
<script> <script>
import { realTableShow, realTableIndex, save, show, relationDestroy } from "@/api/system/customForm"; import { realTableShow, realTableIndex, save, show, relationDestroy, update } from "@/api/system/customForm";
import {listparameter} from "@/api/system/dictionary"; import {listparameter} from "@/api/system/dictionary";
export default { export default {
@ -165,6 +165,7 @@ export default {
customFn: (row) => { customFn: (row) => {
return ( return (
<el-select size="mini" <el-select size="mini"
disabled={!!row.parameter_id}
value={row.link_relation} value={row.link_relation}
on={{ on={{
['change']:e => { ['change']:e => {
@ -198,10 +199,10 @@ export default {
}} }}
on={{ on={{
['click']:e => { ['click']:e => {
console.log(row) this.copyTable.relation = this.list
this.copyTable.relation = [row]
save(this.copyTable).then(res => { save(this.copyTable).then(res => {
this.getDetail() this.getDetail()
update({ id: this.copyTable.id })
}) })
} }
}}> </el-button> }}> </el-button>
@ -227,6 +228,7 @@ export default {
if(row.id){ if(row.id){
relationDestroy({ id: row.id }).then(res => { relationDestroy({ id: row.id }).then(res => {
this.getDetail() this.getDetail()
update({ id: this.copyTable.id })
}) })
} else { } else {
this.list.splice(scope.$index, 1) this.list.splice(scope.$index, 1)

Loading…
Cancel
Save