| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742 |
- <template>
- <div class="projectAdd">
- <el-form :model="projectAddFrom" :rules="projectAddRules" ref="ProjectAddRef">
- <el-descriptions title="基本信息">
- <el-descriptions-item>
- <el-form-item label="保险公司" prop="companyId">
- <el-select :disabled="isEdit" filterable v-model="projectAddFrom.companyId" placeholder="请选择" style="width: 40%" @change="initProduct">
- <el-option v-for="item in companyOption" :key="item.id" :value="item.id" :label="item.nameSimple"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="方案类型" prop="schemeType">
- <el-radio-group :disabled="isEdit" v-model="projectAddFrom.schemeType" @change="schemeTypeChange">
- <el-radio :value="1">基础方案</el-radio>
- <el-radio :value="2">自选方案</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="险种类型" prop="productId">
- <el-radio-group :disabled="isEdit" v-model="projectAddFrom.productId" @change="initProduct">
- <el-radio-button v-for="item in insuranceType" :key="item.value" :value="item.value">{{ item.label }}</el-radio-button>
- </el-radio-group>
- </el-form-item>
- <div style="display: flex;">
- <span style="width: 10%"><a style="color: red">*</a>规则条件</span>
- <!-- <div class="ruleList">
- <div class="ruleItem">
- <el-input placeholder="请填写" style="width: 300px"></el-input>
- <el-select style="width: 100px">
- <el-option key="1" value="1" label="="></el-option>
- <el-option key="2" value="2" label=">"></el-option>
- <el-option key="3" value="3" label="<"></el-option>
- </el-select>
- <el-input placeholder="请填写" style="width: 300px"></el-input>
- <el-icon><CircleCloseFilled /></el-icon>
- </div>
- </div>-->
- <div style="width: 60%">
- <rule-condition-container :rulesAttrList="rulesAttrList" @Del="handleDel"></rule-condition-container>
- </div>
- <!-- <rule-condition :ruleConditionVisible="rulesShow" :attrIdList="rulesAttrList" @save="saveRule" @cancel="cancelRule"></rule-condition>-->
- </div>
- <el-button style="margin: 10px 10%" plain type="primary" icon="plus" @click="addRules">添加条件</el-button>
- <el-descriptions>
- <template #title>
- <div style="display: flex; align-items: center">
- <span>方案配置</span>
- <el-button v-show="!isEdit" type="primary" icon="plus" style="margin-left: 20px;" @click="addProject">添加新方案</el-button>
- </div>
- </template>
- <el-descriptions-item>
- <div class="configuration" v-for="(item, index) in projectAddFrom.schemeList">
- <el-form-item label="方案名称" prop="schemeName">
- <el-input v-model="item.schemeName"></el-input>
- </el-form-item>
- <el-form-item label="方案描述" prop="description">
- <el-input type="textarea" v-model="item.description" maxlength="500"></el-input>
- </el-form-item>
- <div>
- <div style="display: flex; align-items: center; margin-bottom: 10px">
- <span style="margin-right: 20px">驾意险</span>
- <el-button link icon="plus" type="primary" @click="handleDriving(item, index)">选择驾意险</el-button>
- </div>
- <el-table
- :data="item.drivingList"
- >
- <el-table-column label="名称" prop="productName">
- <template #default="scope">
- <el-button link type="primary" @click="getJYXDetail(scope.row)">{{ scope.row.productName }}</el-button>
- </template>
- </el-table-column>
- <el-table-column label="客户端状态" prop="selectedStatus" v-if="projectAddFrom.schemeType!=1">
- <template #default="scope">
- <el-select v-model="scope.row.selectedStatus">
- <el-option label="默认不选中" key="1" value="1"></el-option>
- <el-option label="默认选中" key="2" value="2"></el-option>
- <el-option label="强制选中" key="3" value="3"></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column label="份数" prop="quantity">
- <template #default="scope">
- <el-input-number v-model="scope.row.quantity" style="width: 150px;" min="1" max="99" @change="numberChange($event, scope.row)"></el-input-number>份
- </template>
- </el-table-column>
- <el-table-column label="操作">
- <template #default="scope">
- <el-button link type="primary" @click="drivingTypeDel(item, scope.row)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div>
- <div style="display: flex; align-items: center; margin: 10px 0">
- <span style="margin-right: 20px">险种</span>
- <el-button link icon="plus" type="primary" @click="handlePopover(item, index)">选择险种</el-button>
- <!-- <el-popover placement="bottom-end" trigger="click" width="500" v-model:visible="insuranceShow" @show="handlePopover(item)">
- <template #reference>
- <el-button link icon="plus" type="primary">选择险种</el-button>
- </template>
- </el-popover>-->
- </div>
- <el-table
- :data="item.tableData"
- >
- <el-table-column label="险种" prop="kindName">
- <template #default="scope">
- <a>{{ scope.row.kindName }}</a>
- </template>
- </el-table-column>
- <el-table-column label="保额" prop="optionId">
- <template #default="scope">
- <el-select :disabled="scope.row.insuranceId == '19'" v-if="projectAddFrom.schemeType === 2" v-model="scope.row.moneyId" style="width: 150px" multiple>
- <el-option v-for="m in scope.row.options" :label="m.label" :key="m.id" :value="m.id"></el-option>
- </el-select>
- <el-select :disabled="scope.row.insuranceId == '19'" v-else v-model="scope.row.moneyId" style="width: 150px" @change="">
- <el-option v-for="m in scope.row.options" :label="m.label" :key="m.id" :value="m.id"></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column label="操作">
- <template #default="scope">
- <el-button :disabled="projectAddFrom.productId == '0330'&&scope.row.id=='19' || projectAddFrom.productId == '0330034002'&&scope.row.id=='19' || projectAddFrom.productId == '0330034001'&&scope.row.id=='19'" link type="primary" @click="insuranceTypeDel(item, scope.row)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-descriptions-item>
- </el-descriptions>
- </el-descriptions-item>
- </el-descriptions>
- </el-form>
- <div class="btns">
- <el-button plain @click="quit">取消</el-button>
- <el-button type="primary" @click="save(ProjectAddRef)">保存</el-button>
- </div>
- <el-dialog
- v-model="drivingShow"
- title="选择驾意险"
- width="700"
- >
- <driving ref="DrivingTypeRef" @close="handleDrivingClose"></driving>
- </el-dialog>
- <el-dialog
- v-model="insuranceShow"
- title="选择险种"
- width="500"
- >
- <insurance ref="InsuranceTypeRef" @close="handleClose" ></insurance>
- </el-dialog>
- <el-dialog
- v-model="JYXDetailShow"
- title="驾意险详情"
- width="600"
- >
- <detail ref="JYXDetail"></detail>
- </el-dialog>
- <el-dialog
- v-model="ruleSelectShow"
- title="规则条件"
- width="600"
- >
- <ruleSelect ref="RuleSelect" @close="handleRuleSelectClose"></ruleSelect>
- </el-dialog>
- </div>
- </template>
- <script setup lang="ts">
- import api from "@/api";
- import { ElMessage, FormInstance, FormRules } from "element-plus";
- import { useRouter, useRoute } from 'vue-router'
- import insurance from '../../../../layouts/components/InsuranceType/index.vue'
- import driving from '../../../../layouts/components/DrivingType/index.vue'
- import rule from '../../../../components/ruleConditionContainer/index.vue'
- import detail from '../../../../layouts/components/JYXDetail/index.vue'
- import ruleSelect from '../../../../layouts/components/ruleSelect/index.vue'
- import Detail from "@/views/representative/detail.vue";
- const myRouter = useRouter()
- const myRoute = useRoute()
- const ProjectAddRef = ref<FormInstance>()
- const InsuranceTypeRef = ref(null)
- const DrivingTypeRef = ref(null)
- const JYXDetail = ref(null)
- let RuleSelect = ref()
- // 规则条件
- let ruleSelectShow = ref(false)
- const handleRuleSelectClose = (data) => {
- if(data&&data.length>0) {
- rulesAttrList.value = data.map(a => {
- return {
- ...a,
- min: a.attrName == '能源类型'? '0':'',
- minArray: a.attrName == '使用性质' || a.attrName == '车辆种类'?[a.dictLabal[0].code]:[]
- }
- })
- }
- ruleSelectShow.value = false
- }
- // 是否编辑
- let isEdit = ref(false)
- let projectAddFrom = ref({
- ruleAttrs: [],
- schemeType: 1,
- schemeList: [{
- schemeName: '',
- description: '',
- tableData: [],
- drivingList: [],
- schemeInsuranceList: [],
- drivingIntentionList: []
- }]
- })
- let projectAddRules = ref<FormRules>({
- companyId: [
- { required: true, trigger: "change", message: "请选择保险公司" }
- ],
- schemeType: [
- { required: true, trigger: "change", message: "请选择方案类型" }
- ],
- productId: [
- { required: true, trigger: "change", message: "请选择险种类型" }
- ]
- })
- // 驾意险详情
- let JYXDetailShow = ref(false)
- const getJYXDetail = (row) => {
- JYXDetailShow.value = true
- nextTick(() => {
- JYXDetail.value.initData(row.drivingIntentionId)
- })
- }
- const numberChange = (e, row) => {
- if(typeof e != 'number') {
- // ElMessage({
- // message: '请输入驾意险份数!',
- // type: 'warning'
- // })
- row.quantity = 1
- }
- }
- // 新增的时候初始化已有的方案
- const initProduct = (e) => {
- // energyType 能源类型
- // vehicleType 车辆种类
- // carnature 使用性质
- let energyType = null, vehicleType = null, carnature = null
- if(rulesAttrList.value && rulesAttrList.value.length > 0) {
- energyType = rulesAttrList.value.find(a => a.attrName === '能源类型')
- vehicleType = rulesAttrList.value.find(a => a.attrName === '车辆种类')
- carnature = rulesAttrList.value.find(a => a.attrName === '使用性质')
- }
- // initAttr()
- if(e == '0330' || e == '0330034001') {
- let obj = insuranceTypeList.value.filter(item => item.id == '19')
- if(obj) {
- obj.forEach(item => {
- item.insuranceId = item.id
- if(item.id == '19') {
- item.moneyId = item.options[0].id
- }
- })
- projectAddFrom.value.schemeList.forEach(item => {
- item.schemeName = ''
- item.description = ''
- item.drivingList = []
- item.tableData = [...obj]
- })
- }
- } else if(e == '034002') {
- let obj = insuranceTypeList.value.find(item => item.id == '2')
- obj.insuranceId = obj.id
- projectAddFrom.value.schemeList.forEach(item => {
- item.schemeName = ''
- item.description = ''
- item.drivingList = []
- item.tableData = [obj]
- })
- } else if(e == '0330034002') {
- let obj = insuranceTypeList.value.filter(item => item.id == '2' || item.id == '19')
- if(obj) {
- obj.forEach(item => {
- item.insuranceId = item.id
- if(item.id == '19') {
- item.moneyId = item.options[0].id
- }
- })
- projectAddFrom.value.schemeList.forEach(item => {
- item.schemeName = ''
- item.description = ''
- item.drivingList = []
- item.tableData = [...obj]
- })
- }
- } else {
- projectAddFrom.value.schemeList.forEach(item => {
- item.schemeName = ''
- item.description = ''
- item.drivingList = []
- item.tableData = []
- })
- }
- if(projectAddFrom.value.companyId&&projectAddFrom.value.productId&&projectAddFrom.value.schemeType) {
- console.log('选项123', energyType)
- api.projectApi.getSchemeByCompany({
- companyId: projectAddFrom.value.companyId,
- productId: projectAddFrom.value.productId,
- schemeType: projectAddFrom.value.schemeType,
- energyType: energyType.min,
- vehicleType: vehicleType.minArray.join(','),
- carnature: carnature.minArray.join(','),
- }).then(res => {
- if(res.code == 200) {
- if(res.data && res.data.schemeList.length > 0) {
- res.data.schemeList.forEach(item => {
- item.drivingList = item.drivingIntentionList
- item.tableData = item.schemeInsuranceList.map(sub => {
- let obj = insuranceTypeList.value.find(a => a.id === sub.insuranceId)
- return {
- ...sub,
- optionId: res.data.schemeType===1?`${sub.optionId[0]}`:sub.optionId,
- moneyId: res.data.schemeType===1?`${sub.optionId[0]}`:sub.optionId,
- options: obj.options
- }
- })
- })
- projectAddFrom.value = res.data
- rulesAttrList.value = res.data.ruleAttrs
- }
- } else {
- // projectAddFrom.value.ruleAttrs = []
- // if(e == '0330' || e == '0330034002' || e == '0330034001') {
- // let obj = insuranceTypeList.value.find(a => a.alias == '交强险')
- // if(obj) {
- // obj.insuranceId = obj.id
- // let sub = obj.options.find(b => b.label == '投保')
- // obj.optionId = projectAddFrom.value.schemeType==1?sub?.id:projectAddFrom.value.schemeType==2?[sub?.id]:''
- // obj.moneyId = sub?.id
- // }
- // projectAddFrom.value.schemeList = [{
- // schemeName: '',
- // description: '',
- // tableData: [obj],
- // drivingList: [],
- // schemeInsuranceList: [obj],
- // drivingIntentionList: []
- // }]
- // } else {
- // projectAddFrom.value.schemeList = [{
- // schemeName: '',
- // description: '',
- // tableData: [],
- // drivingList: [],
- // schemeInsuranceList: [],
- // drivingIntentionList: []
- // }]
- // }
- // ElMessage({
- // message: res.msg,
- // type: 'warning'
- // })
- }
- })
- }
- }
- // 险种
- let insuranceTypeList = ref([])
- const initInsurance = () => {
- api.projectApi.getBusinessInsurance().then(res => {
- if(res.code == 200) {
- // res.data.forEach(item => {
- // item.options.forEach(sub => {
- // sub.id = sub.value
- // })
- // })
- insuranceTypeList.value = res.data
- if(projectAddFrom.value.productId == '0330' || projectAddFrom.value.productId == '0330034001') {
- let obj = insuranceTypeList.value.filter(item => item.id == '19')
- if(obj) {
- obj.forEach(item => {
- item.insuranceId = item.id
- if(item.id == '19') {
- item.moneyId = item.options[0].id
- }
- })
- projectAddFrom.value.schemeList.forEach(item => {
- item.drivingList = []
- item.tableData = [...obj]
- })
- }
- } else if(projectAddFrom.value.productId == '034002') {
- let obj = insuranceTypeList.value.find(item => item.id == '2')
- obj.insuranceId = obj.id
- projectAddFrom.value.schemeList.forEach(item => {
- item.drivingList = []
- item.tableData = [obj]
- })
- } else if(projectAddFrom.value.productId == '0330034002') {
- let obj = insuranceTypeList.value.filter(item => item.id == '2' || item.id == '19')
- if(obj) {
- obj.forEach(item => {
- item.insuranceId = item.id
- if(item.id == '19') {
- item.moneyId = item.options[0].id
- }
- })
- projectAddFrom.value.schemeList.forEach(item => {
- item.drivingList = []
- item.tableData = [...obj]
- })
- }
- } else {
- projectAddFrom.value.schemeList.forEach(item => {
- item.drivingList = []
- item.tableData = []
- })
- }
- } else {
- ElMessage({
- message: res.msg,
- type: 'warning'
- })
- }
- })
- }
- // 方案类型切换
- const schemeTypeChange = (e) => {
- initProduct(projectAddFrom.value.productId)
- }
- // 保险公司
- let companyOption = ref([])
- const initCompany = () => {
- // api.projectApi.getCompanyList().then(res => {
- api.insuranceApi.leftList('').then(res => {
- if(res.code == 200) {
- companyOption.value = res.data
- } else {
- ElMessage({
- message: res.msg,
- type: 'warning'
- })
- }
- })
- }
- // 新增方案
- const addProject = () => {
- projectAddFrom.value.schemeList.push({
- schemeName: '',
- description: '',
- tableData: [],
- drivingList: [],
- schemeInsuranceList: [],
- drivingIntentionList: []
- })
- }
- // 规则
- let rulesShow = ref(false)
- const addRules = () => {
- ruleSelectShow.value = true
- nextTick(() => {
- RuleSelect.value.initEditData(rulesAttrList.value)
- })
- }
- let rulesAttrList = ref([])
- let defaultAttrList = ref([])
- // const saveRule = (data) => {
- // console.log(123123123, data)
- // if(data && data.length > 0) {
- // rulesAttrList.value = data
- // }
- // rulesShow.value = false
- // }
- const cancelRule = (data) => {
- rulesShow.value = false
- }
- const handleDel = (index) => {
- if(rulesAttrList.value[index].attrName === '能源类型' || rulesAttrList.value[index].attrName === '使用性质' || rulesAttrList.value[index].attrName === '车辆种类') {
- return
- } else {
- rulesAttrList.value.splice(index, 1)
- }
- }
- // 险种类型
- let insuranceType = ref([])
- const initType = () => {
- api.commonApi.personInfo('insurance_type').then(res => {
- if(res.code == 200) {
- insuranceType.value = res.data
- projectAddFrom.value.productId = insuranceType.value[0].value
- } else {
- ElMessage({
- message: res.msg,
- type: 'warning'
- })
- }
- })
- }
- // 险种
- let insuranceShow = ref(false)
- // let insuranceList = ref([])
- // let checkInsuranceList = ref([])
- // let checkSubInsuranceList = ref([])
- const handleClose = ( obj ) => {
- if(obj.list && obj.list.length > 0) {
- if(projectAddFrom.value.schemeType === 2) {
- obj.list.forEach(a => {
- a.optionId = []
- a.options.forEach(b => {
- if(b.checked) {
- a.optionId.push(b.id)
- }
- })
- a.moneyId = a.optionId
- })
- } else {
- obj.list.forEach(a => {
- a.optionId = a.options.find(b => b.checked)?.id
- a.moneyId = a.optionId
- })
- }
- projectAddFrom.value.schemeList[obj.index].tableData = obj.list
- }
- insuranceShow.value = false
- }
- // 险种删除
- const insuranceTypeDel = (item, row) => {
- let data = item.tableData.filter(a => a.insuranceId != row.insuranceId)
- item.tableData = [...data]
- }
- // 驾意险
- let drivingShow = ref(false)
- const handleDriving = (item, index) => {
- drivingShow.value = true
- nextTick(() => {
- DrivingTypeRef.value.initEditData(item.drivingList, index, myRoute.query.companyId)
- })
- }
- const handleDrivingClose = ( obj ) => {
- if(obj.list && obj.list.length > 0) {
- // let selectList = obj.list.filter(a => a.checked)
- obj.list.forEach(sub => {
- sub.drivingIntentionId = sub.drivingIntentionId
- sub.selectedStatus = sub.selectedStatus?sub.selectedStatus:'1'
- sub.quantity = sub.quantity?sub.quantity:'1'
- })
- projectAddFrom.value.schemeList[obj.index].drivingList = obj.list
- }
- drivingShow.value = false
- }
- const drivingTypeDel = (item, row) => {
- let data = item.drivingList.filter(a => a.id != row.id)
- item.drivingList = [...data]
- }
- const handlePopover = (item, index) => {
- insuranceShow.value = true
- nextTick(() => {
- InsuranceTypeRef.value.initEditData(item.tableData, index, projectAddFrom.value.schemeType)
- })
- }
- // 规则
- const initAttr = () => {
- api.agreementApi.ruleAttrGroup({ attrName: '' }).then(res => {
- if(res.code == 200) {
- let list = res.data?.VehicleInformation?.filter(e => e.attrName === '能源类型' || e.attrName === '使用性质' || e.attrName === '车辆种类')
- rulesAttrList.value = list?.map(a => {
- return {
- ...a,
- min: a.attrName == '能源类型'? '0':'',
- minArray: a.minArray?a.minArray:a.attrName == '使用性质' || a.attrName == '车辆种类'?[a.dictLabal[0].code]:[]
- }
- })
- defaultAttrList.value = [...list]
- } else {
- ElMessage({
- message: res.msg,
- type: 'warning'
- })
- }
- })
- }
- // 编辑
- const initEdit = () => {
- api.projectApi.getScheme(myRoute.query.id).then(res => {
- if(res.code == 200) {
- if(res.data && res.data.schemeList.length > 0) {
- res.data.schemeList.forEach(item => {
- item.drivingList = item.drivingIntentionList
- item.tableData = item.schemeInsuranceList.map(sub => {
- let obj = insuranceTypeList.value.find(a => a.id === sub.insuranceId)
- return {
- ...sub,
- optionId: res.data.schemeType===1?`${sub.optionId[0]}`:sub.optionId,
- moneyId: res.data.schemeType===1?`${sub.optionId[0]}`:sub.optionId,
- options: obj.options
- }
- })
- })
- projectAddFrom.value = res.data
- rulesAttrList.value = res.data.ruleAttrs
- }
- } else {
- ElMessage({
- message: res.msg,
- type: 'warning'
- })
- }
- })
- }
- // 取消
- const quit = () => {
- myRouter.push({
- path: '/quoteConfig/agreement/project'
- })
- }
- // 保存
- const save = async (ProjectAddRef: FormInstance | undefined) => {
- if(!ProjectAddRef) {
- ProjectAddRef.resetFields()
- return
- }
- await ProjectAddRef.validate((valid) => {
- if(valid) {
- let formData = {...projectAddFrom.value}
- formData.ruleAttrs = [...rulesAttrList.value]
- formData.schemeList.forEach(item => {
- item.drivingIntentionList = []
- item.schemeInsuranceList = []
- item.drivingList.forEach(sub => {
- let obj = {
- id: sub.id,
- drivingIntentionId: sub.drivingIntentionId,
- selectedStatus: sub.selectedStatus,
- quantity: sub.quantity
- }
- item.drivingIntentionList.push(obj)
- })
- item.tableData.forEach(ins => {
- let obj = {
- id: ins.id,
- insuranceId: ins.insuranceId,
- optionId: projectAddFrom.value.schemeType === 1?[ins.moneyId]:projectAddFrom.value.schemeType === 2?ins.moneyId:[]
- }
- // ins.options.forEach(sub => {
- // if(sub.checked) {
- // obj.optionId.push(sub.id)
- // }
- // })
- item.schemeInsuranceList.push(obj)
- })
- })
- api.projectApi.saveScheme({...formData}).then(res => {
- if(res.code == 200) {
- ElMessage({
- message: res.msg,
- type: 'success'
- })
- myRouter.push({
- path: '/quoteConfig/agreement/project'
- })
- } else if(res.code != 400) {
- ElMessage({
- message: res.msg,
- type: 'warning'
- })
- }
- })
- } else {
- ElMessage({
- message: '请正确填写相关信息!',
- type: 'warning'
- })
- }
- })
- }
- onMounted(() => {
- initInsurance()
- initType()
- initCompany()
- projectAddFrom.value.companyId = myRoute.query.companyId
- // initAttr()
- if(myRoute.query.id) {
- isEdit.value = true
- projectAddFrom.value.id = myRoute.query.id
- initEdit()
- } else {
- isEdit.value = false
- initAttr()
- }
- // initInsurance()
- })
- </script>
- <style scoped lang="scss">
- .projectAdd{
- width: 100%;
- height: 100%;
- background: white;
- padding: 20px;
- .ruleList{
- width: 90%;
- .ruleItem{
- display: flex;
- align-items: center;
- justify-content: flex-start;
- margin: 10px 0;
- }
- }
- .configuration{
- width: 100%;
- background: #f0f0f0;
- padding: 20px 100px;
- margin-bottom: 10px;
- border-radius: 5px;
- }
- .btns{
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- </style>
|