jiangping
2025-06-17 78a173f85f8a4666d83cf8d900f04dd9f8e3e127
company/src/views/business/insurance.vue
@@ -27,10 +27,25 @@
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="保险公司" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="LOGO" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="英文名称" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="联系人" min-width="100px"></el-table-column>
                <el-table-column prop="name" label="联系电话" min-width="100px"></el-table-column>
                <el-table-column prop="logo" label="LOGO" min-width="100px">
                    <template slot-scope="{row}">
                        <el-image
                            v-if="row.logoFullUrl"
                            style="width: 100px; height: 100px"
                            :src="row.logoFullUrl"
                            :preview-src-list="[row.logoFullUrl]">
                        </el-image>
                    </template>
                </el-table-column>
                <el-table-column prop="englishName" label="英文名称" min-width="100px"></el-table-column>
                <el-table-column prop="linkName" label="联系人" min-width="100px"></el-table-column>
                <el-table-column prop="linkPhone" label="联系电话" min-width="100px"></el-table-column>
                <el-table-column label="是否维护" min-width="100px">
                    <template slot-scope="{row}">
                        <span v-if="row.lpFileStatus === 1">已维护</span>
                        <span v-else>未维护</span>
                    </template>
                </el-table-column>
                <el-table-column label="启用状态" min-width="100px">
                    <template slot-scope="{row}">
                        <el-switch
@@ -46,12 +61,13 @@
                <el-table-column
                    v-if="containPermissions(['business:insurance:update', 'business:insurance:delete'])"
                    label="操作"
                    min-width="120"
                    min-width="150"
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.OperaInsuranceDescWindow.open('保险公司详情', row)" icon="el-icon-edit" v-permissions="['business:insurance:update']">查看详情</el-button>
                        <el-button type="text" @click="$refs.operaInsuranceWindow.open('修改保险公司', row)" icon="el-icon-edit" v-permissions="['business:insurance:update']">修改</el-button>
                        <el-button type="text" @click="$refs.setCompany.open('理赔材料配置', row.id)" icon="el-icon-edit">设置</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -66,48 +82,51 @@
        <OperaInsuranceWindow ref="operaInsuranceWindow" @success="handlePageChange"/>
        <!-- 详情 -->
        <OperaInsuranceDescWindow ref="OperaInsuranceDescWindow" @success="handlePageChange"/>
        <!-- 设置 -->
        <SetCompany ref="setCompany" @success="handlePageChange"/>
    </TableLayout>
</template>
<script>
    import BaseTable from '@/components/base/BaseTable'
    import TableLayout from '@/layouts/TableLayout'
    import Pagination from '@/components/common/Pagination'
    import OperaInsuranceWindow from '@/components/business/OperaInsuranceWindow'
    import OperaInsuranceDescWindow from '@/components/business/OperaInsuranceDescWindow'
    import { updateStatus } from '@/api/business/insurance'
    export default {
        name: 'Insurance',
        extends: BaseTable,
        components: { TableLayout, Pagination, OperaInsuranceWindow, OperaInsuranceDescWindow },
        data () {
            return {
                // 搜索
                searchForm: {
                    name: ''
                }
            }
        },
        created () {
            this.config({
                module: '保险公司信息表',
                api: '/business/insurance',
                'field.id': 'id',
                'field.main': 'id'
            })
            this.search()
        },
        methods: {
            // 修改状态
            changeStatus(status, row) {
                updateStatus({ id: row.id, status })
                    .then(res => {
                        this.search()
                    })
                    .catch(err => {
                        row.status = row.status === 0 ? 1 : 0
                    })
            }
        }
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaInsuranceWindow from '@/components/business/OperaInsuranceWindow'
import OperaInsuranceDescWindow from '@/components/business/OperaInsuranceDescWindow'
import SetCompany from '@/components/business/setCompany'
import { updateStatus } from '@/api/business/insurance'
export default {
  name: 'Insurance',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaInsuranceWindow, OperaInsuranceDescWindow, SetCompany },
  data () {
    return {
      // 搜索
      searchForm: {
        name: ''
      }
    }
  },
  created () {
    this.config({
      module: '保险公司信息表',
      api: '/business/insurance',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
  },
  methods: {
    // 修改状态
    changeStatus (status, row) {
      updateStatus({ id: row.id, status })
        .then(res => {
          this.search()
        })
        .catch(err => {
          row.status = row.status === 0 ? 1 : 0
        })
    }
  }
}
</script>