|
|
@@ -178,6 +178,7 @@ import {
|
|
|
getAssetUrl,
|
|
|
getContracts,
|
|
|
addContract,
|
|
|
+ updateContractName,
|
|
|
updateContract,
|
|
|
getContract,
|
|
|
deleteContract,
|
|
|
@@ -202,7 +203,7 @@ export default {
|
|
|
list: getContracts,
|
|
|
transform: this.transform,
|
|
|
cols: [
|
|
|
- { prop: 'name', label: '名称', render: (data, h) => h('edit-input', {
|
|
|
+ { label: '名称', render: (data, h) => h('edit-input', {
|
|
|
props: {
|
|
|
value: `${data.name}`,
|
|
|
maxlength: 50
|
|
|
@@ -285,11 +286,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
contract.name = newVal
|
|
|
- updateContract(contract.id, {
|
|
|
- attrs: {
|
|
|
- name: newVal
|
|
|
- }
|
|
|
- }).catch(() => {
|
|
|
+ updateContractName(contract.id, newVal).catch(() => {
|
|
|
contract.name = oldVal
|
|
|
})
|
|
|
},
|