|
|
@@ -27,7 +27,7 @@
|
|
|
<ElButton type="primary" @click="addProject">添加新方案</ElButton>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-form class="p-[20px_8px_0_24px]" :model="projectForm" ref="projectRefs">
|
|
|
+ <el-form class="p-[20px_8px_0_24px]" :model="projectForm" ref="projectRefs">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="4">
|
|
|
<el-form-item label="方案类型">
|
|
|
@@ -67,6 +67,7 @@
|
|
|
<el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
|
|
+ <el-button link type="primary" @click="handleCopy(scope.row)">复制</el-button>
|
|
|
<el-button link type="primary" @click="handleDel(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -150,6 +151,19 @@
|
|
|
</el-col>
|
|
|
</el-row> -->
|
|
|
</PageMain>
|
|
|
+ <el-dialog v-model="copyDialog" title="复制" width="600">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="险种类型">
|
|
|
+ <el-select v-model="insuranceTypeValue" placeholder="请选择险种类型">
|
|
|
+ <el-option v-for="item in insuranceType" :key="item.value" :value="item.value"
|
|
|
+ :label="item.label"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button size="small" type="primary" @click="submitCopy">确定</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
@@ -159,7 +173,6 @@ import { useRouter, useRoute } from 'vue-router'
|
|
|
|
|
|
const myRouter = useRouter()
|
|
|
const muRoute = useRoute()
|
|
|
-console.log(muRoute.query.id)
|
|
|
const searchCompany = () => {
|
|
|
currentPage.value = 1
|
|
|
pageSize.value = 10
|
|
|
@@ -307,6 +320,39 @@ const handleDel = (row) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const copyDialog = ref(false)
|
|
|
+const copyId = ref('')
|
|
|
+const insuranceTypeValue = ref('')
|
|
|
+/** 复制操作处理:记录当前行的ID并打开复制确认对话框 */
|
|
|
+const handleCopy = (row) => {
|
|
|
+ copyId.value = row.id
|
|
|
+ copyDialog.value = true
|
|
|
+}
|
|
|
+/** 提交复制操作,校验险种选择后触发保险公司查询 */
|
|
|
+const submitCopy = () => {
|
|
|
+ if (insuranceTypeValue.value.length == 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请选择险种',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const params = {
|
|
|
+ schemeId: copyId.value,
|
|
|
+ productCode: insuranceTypeValue.value
|
|
|
+ }
|
|
|
+ api.projectApi.copyScheme(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ copyDialog.value = false
|
|
|
+ searchCompany()
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
// initData()
|
|
|
initCompany()
|
|
|
@@ -316,18 +362,20 @@ onMounted(() => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-:deep(.main-container){
|
|
|
+:deep(.main-container) {
|
|
|
padding: 16px;
|
|
|
}
|
|
|
+
|
|
|
:deep(.el-input-group__append) {
|
|
|
color: #fff;
|
|
|
- background: linear-gradient( 91deg, #4FCAFF 0%, #2B62FF 100%);
|
|
|
+ background: linear-gradient(91deg, #4FCAFF 0%, #2B62FF 100%);
|
|
|
}
|
|
|
+
|
|
|
.member-tree {
|
|
|
&::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
- height: calc(100% + 40px);
|
|
|
+ height: calc(100% + 32px);
|
|
|
width: 1px;
|
|
|
background-color: #EEEEEE;
|
|
|
top: -16px;
|
|
|
@@ -335,6 +383,7 @@ onMounted(() => {
|
|
|
bottom: -16px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.role-item {
|
|
|
cursor: pointer;
|
|
|
}
|