From 58c2e3e1dd75513b90f878684e913d85db41cc41 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 26 一月 2024 09:24:31 +0800
Subject: [PATCH] Mr.Shi
---
company/src/components/business/OperaInsuranceDescWindow.vue | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/company/src/components/business/OperaInsuranceDescWindow.vue b/company/src/components/business/OperaInsuranceDescWindow.vue
index 9c2176c..9d65468 100644
--- a/company/src/components/business/OperaInsuranceDescWindow.vue
+++ b/company/src/components/business/OperaInsuranceDescWindow.vue
@@ -4,12 +4,12 @@
submitText="淇敼"
:visible.sync="visible"
:confirm-working="isWorking"
- @confirm="$refs.operaInsuranceWindow.open('缂栬緫淇濋櫓鍏徃')"
+ @confirm="$refs.operaInsuranceWindow.open('缂栬緫淇濋櫓鍏徃', form)"
>
<div class="box">
<div class="box_name">
- <span>淇濋櫓鍏徃锛氬钩瀹変繚闄�</span>
- <span>鏄惁鍚敤锛氭槸</span>
+ <span>淇濋櫓鍏徃锛歿{form.name}}</span>
+ <span>鏄惁鍚敤锛歿{form.status == 0 ? '鍚敤' : '绂佺敤'}}</span>
</div>
<el-table
:data="tableData"
@@ -30,7 +30,7 @@
</el-table>
</div>
<!-- 鏂板缓/淇敼 -->
- <OperaInsuranceWindow ref="operaInsuranceWindow" @success="handlePageChange"/>
+ <OperaInsuranceWindow ref="operaInsuranceWindow" @success="success"/>
</GlobalWindow>
</template>
@@ -38,6 +38,7 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import OperaInsuranceWindow from '@/components/business/OperaInsuranceWindow'
+ import { all } from '@/api/business/worktype'
export default {
name: 'OperaInsuranceDescWindow',
extends: BaseOpera,
@@ -47,10 +48,8 @@
// 琛ㄥ崟鏁版嵁
form: {
id: null,
- name: ''
- },
- // 楠岃瘉瑙勫垯
- rules: {
+ name: '',
+ status: ''
},
tableData: []
}
@@ -60,6 +59,38 @@
api: '/business/insurance',
'field.id': 'id'
})
+ },
+ methods: {
+ open (title, target) {
+ this.title = title
+ this.visible = true
+ // 鏂板缓
+ if (target == null) {
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form[this.configData['field.id']] = null
+ })
+ return
+ }
+ // 缂栬緫
+ this.$nextTick(() => {
+ for (const key in this.form) {
+ this.form[key] = target[key]
+ }
+ all({ insuranceId: this.form.id })
+ .then(res => {
+ let arr = []
+ res.forEach(item => {
+ arr.push({ name: item.name })
+ })
+ this.tableData = arr
+ })
+ })
+ },
+ success() {
+ this.$emit('success')
+ this.visible = false
+ }
}
}
</script>
--
Gitblit v1.9.3