Commit 9ce23427bf6374758d14255eb604aa90a3efd503
1 parent
844ffae4
优化一些bug
Showing
1 changed file
with
15 additions
and
0 deletions
src/components/contract/addTemplateView.vue
| @@ -67,6 +67,21 @@ export default { | @@ -67,6 +67,21 @@ export default { | ||
| 67 | const reg = `#${rname}#` | 67 | const reg = `#${rname}#` |
| 68 | this.contractTypeAttrs.push(reg) | 68 | this.contractTypeAttrs.push(reg) |
| 69 | }) | 69 | }) |
| 70 | + | ||
| 71 | + // 处理基本属性 | ||
| 72 | + if (data.baseRepalce) { | ||
| 73 | + data.baseRepalce.forEach(e => { | ||
| 74 | + const rname = e.name | ||
| 75 | + const rkey = e.key | ||
| 76 | + const contractarr = Object.keys(data.contract[0] || {}) | ||
| 77 | + for (const a in contractarr) { | ||
| 78 | + if (rkey === contractarr[a]) { | ||
| 79 | + const reg = `#${rname}#` | ||
| 80 | + this.contractTypeAttrs.push(reg) | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | + }) | ||
| 84 | + } | ||
| 70 | } catch (error) { | 85 | } catch (error) { |
| 71 | console.error('加载合同属性失败:', error) | 86 | console.error('加载合同属性失败:', error) |
| 72 | } | 87 | } |