|
@@ -33,11 +33,16 @@
|
|
|
<el-table size="small" :data="pageResult" height="690" border style="width: 100%" v-loading="loading"
|
|
<el-table size="small" :data="pageResult" height="690" border style="width: 100%" v-loading="loading"
|
|
|
highlight-current-row stripe
|
|
highlight-current-row stripe
|
|
|
:header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }">
|
|
:header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }">
|
|
|
- <el-table-column prop="id" label="ID" width="300" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column prop="insCompanyId" label="保险公司" width="100" align="center"></el-table-column>
|
|
|
|
|
- <el-table-column prop="username" label="账号" align="center" width="150"></el-table-column>
|
|
|
|
|
- <el-table-column prop="password" label="密码" align="center" width="200"></el-table-column>
|
|
|
|
|
- <el-table-column prop="userId" label="操作人" align="center" width="200"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="companyId" label="ID" width="300" align="center"></el-table-column>
|
|
|
|
|
+ <el-table-column prop="namesimple" label="保险公司" width="100" align="center"></el-table-column>
|
|
|
|
|
+ <el-table-column prop="url" label="地址" align="center" width="150"></el-table-column>
|
|
|
|
|
+ <el-table-column prop="isOpen" label="状态" align="center" width="200">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag v-if="(scope.row.isOpen == '1')">开启</el-tag>
|
|
|
|
|
+ <el-tag v-if="(scope.row.isOpen == '0')">关闭</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="configure" label="配置参数" align="center" width="200"></el-table-column>
|
|
|
<el-table-column label="操作" align="center" min-width="300" fixed="right">
|
|
<el-table-column label="操作" align="center" min-width="300" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" @click="CloseEdit(scope.$index, scope.row)">编辑</el-button>
|
|
<el-button size="mini" type="text" @click="CloseEdit(scope.$index, scope.row)">编辑</el-button>
|
|
@@ -51,43 +56,69 @@
|
|
|
:current-page="pageNum" :page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
|
|
:current-page="pageNum" :page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="totalSize"></el-pagination>
|
|
layout="total, sizes, prev, pager, next, jumper" :total="totalSize"></el-pagination>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-dialog title="渠道信息新增" :visible.sync="dialogVisible" width="70vw">
|
|
|
|
|
- <el-form class="demo-ruleForm" :inline="true" :model="attributionform" ref="attributionform" label-width="130px"
|
|
|
|
|
- size="small" style="margin-top:30px;">
|
|
|
|
|
|
|
+ <el-dialog title="续保配置新增" :visible.sync="dialogVisible" width="1000px">
|
|
|
|
|
+ <el-form class="demo-ruleForm" :model="attributionform" ref="attributionform" label-width="130px" size="small"
|
|
|
|
|
+ style="margin-top:30px;">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" :span="8">
|
|
|
|
|
|
|
+ <el-col :span="10">
|
|
|
<el-form-item label="保险公司:">
|
|
<el-form-item label="保险公司:">
|
|
|
- <el-select class="widths1" v-model="attributionform.insCompanyId" @change="companyChange">
|
|
|
|
|
|
|
+ <el-select class="widths1" v-model="attributionform.companyId" @change="companyChange">
|
|
|
<el-option v-for="(item, index) in companyselect" :key="index.id" :label="item.namesimple"
|
|
<el-option v-for="(item, index) in companyselect" :key="index.id" :label="item.namesimple"
|
|
|
:value="item.id"></el-option>
|
|
:value="item.id"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" :span="8">
|
|
|
|
|
- <el-form-item prop="username" label="用户名:" :rules="[
|
|
|
|
|
- { required: true, message: '请输入用户名', trigger: 'blur' },
|
|
|
|
|
- ]">
|
|
|
|
|
- <el-input v-model="attributionform.username" class="widths1"></el-input>
|
|
|
|
|
|
|
+ <el-col :span="10">
|
|
|
|
|
+ <el-form-item label="保险公司简称:">
|
|
|
|
|
+ <el-input v-model="attributionform.namesimple" class="widths1" placeholder="填写公司简称"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" :span="8">
|
|
|
|
|
- <el-form-item prop="password" label="密码:" :rules="[
|
|
|
|
|
- { required: true, message: '请输入密码', trigger: 'blur' },
|
|
|
|
|
- ]">
|
|
|
|
|
- <el-input v-model="attributionform.password" class="widths1"></el-input>
|
|
|
|
|
|
|
+ <el-col :span="10">
|
|
|
|
|
+ <el-form-item label="续保请求url:">
|
|
|
|
|
+ <el-input v-model="attributionform.url" style="width: 100%;" placeholder="填写续保链接"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" :span="8"
|
|
|
|
|
- v-for="(domain, index) in attributionform.fields" :key="domain.index">
|
|
|
|
|
- <el-form-item :label="domain.label + ':'" :prop="'fields.' + index + '.value'" :rules="{
|
|
|
|
|
- required: true, message: domain.label + '不能为空', trigger: 'blur'
|
|
|
|
|
- }">
|
|
|
|
|
- <el-input class="widths1" v-model="domain.value" :type="domain.type"></el-input>
|
|
|
|
|
|
|
+ <el-col :span="10">
|
|
|
|
|
+ <el-form-item label="是否开启:">
|
|
|
|
|
+ <el-switch v-model="switchvalue" @change="isOpenchange" class="widths1"></el-switch>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <h4>配置参数</h4>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col v-for="(configureitem, configureindex) in attributionform.configure" :key="configureindex">
|
|
|
|
|
+ <el-col :span="10">
|
|
|
|
|
+ <el-form-item label="字段名:">
|
|
|
|
|
+ <el-input v-model="configureitem.field" class="widths1" placeholder="请输入字段名"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="标签:">
|
|
|
|
|
+ <el-input v-model="configureitem.label" class="widths1" placeholder="标签名"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="10">
|
|
|
|
|
+ <el-form-item label="表单类型:">
|
|
|
|
|
+ <!-- <el-input v-model="configureitem.type" class="widths1" placeholder="表单类型"></el-input> -->
|
|
|
|
|
+ <el-radio-group v-model="configureitem.type">
|
|
|
|
|
+ <el-radio label="input"></el-radio>
|
|
|
|
|
+ <el-radio label="select"></el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="是否可修改:">
|
|
|
|
|
+ <el-switch v-model="updatevalue" @change="(event) => isEditchange(event, configureindex)"
|
|
|
|
|
+ class="widths1"></el-switch>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="4" v-show="configureindex != 0">
|
|
|
|
|
+ <el-button @click.prevent="removeDomain(configureitem)" size="small">删除</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button size="small" @click="configuration">新增配置</el-button>
|
|
|
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
|
<el-button size="small" type="primary" @click="submitForm('attributionform')">提 交</el-button>
|
|
<el-button size="small" type="primary" @click="submitForm('attributionform')">提 交</el-button>
|
|
|
</span>
|
|
</span>
|
|
@@ -111,6 +142,8 @@
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ switchvalue: false,//开启开关
|
|
|
|
|
+ updatevalue: false,//修改开关
|
|
|
filterText: '',
|
|
filterText: '',
|
|
|
treedata: [],//树形数据
|
|
treedata: [],//树形数据
|
|
|
defaultProps: {
|
|
defaultProps: {
|
|
@@ -131,11 +164,17 @@ export default {
|
|
|
monthvalue: "",//日期
|
|
monthvalue: "",//日期
|
|
|
},
|
|
},
|
|
|
attributionform: {
|
|
attributionform: {
|
|
|
- fields: [],
|
|
|
|
|
- insCompanyId: "",
|
|
|
|
|
- password: "",
|
|
|
|
|
- username: "",
|
|
|
|
|
- id: "",
|
|
|
|
|
|
|
+ configure: [{
|
|
|
|
|
+ field: "",
|
|
|
|
|
+ isEdit: 0,
|
|
|
|
|
+ label: "",
|
|
|
|
|
+ type: "",
|
|
|
|
|
+ value: "",
|
|
|
|
|
+ }],
|
|
|
|
|
+ insCompanyId: "",//保险公司id
|
|
|
|
|
+ isOpen: 0,//是/否开启
|
|
|
|
|
+ namesimple: "",//保险公司简称
|
|
|
|
|
+ url: "",//续保请求url
|
|
|
},
|
|
},
|
|
|
pageRequest: {
|
|
pageRequest: {
|
|
|
"pageNum": 1,
|
|
"pageNum": 1,
|
|
@@ -149,7 +188,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
companyselect: [],
|
|
companyselect: [],
|
|
|
- fieldslist: [],
|
|
|
|
|
|
|
+ configurelist: [],
|
|
|
treeparams: {
|
|
treeparams: {
|
|
|
deptIds: [],
|
|
deptIds: [],
|
|
|
attributionId: "",
|
|
attributionId: "",
|
|
@@ -158,18 +197,17 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- this.$api.insCompany.attribution(this.pageNum, this.pageSize).then((res) => {
|
|
|
|
|
- this.pageResult = res.data.content;
|
|
|
|
|
- this.pageSize=res.data.pageSize;
|
|
|
|
|
- this.pageNum=res.data.pageNum;
|
|
|
|
|
- this.totalSize=res.data.totalSize;
|
|
|
|
|
- })
|
|
|
|
|
this.$api.insCompany.findPage(this.pageRequest).then((res) => {
|
|
this.$api.insCompany.findPage(this.pageRequest).then((res) => {
|
|
|
this.companyselect = res.data.content;
|
|
this.companyselect = res.data.content;
|
|
|
})
|
|
})
|
|
|
- this.$api.dept.findDeptTree().then((res) => {
|
|
|
|
|
- this.treedata = res.data;
|
|
|
|
|
|
|
+ this.$api.insCompany.queryrenewal(this.pageNum, this.pageSize).then((res) => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ if (res.code == '200') {
|
|
|
|
|
+ this.pageResult = res.data.content;
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
filterText(val) {
|
|
filterText(val) {
|
|
@@ -177,6 +215,40 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //删除事件
|
|
|
|
|
+ removeDomain(item) {
|
|
|
|
|
+ var index = this.attributionform.configure.indexOf(item)
|
|
|
|
|
+ if (index !== -1) {
|
|
|
|
|
+ this.attributionform.configure.splice(index, 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ //新增配置按钮
|
|
|
|
|
+ configuration() {
|
|
|
|
|
+ this.attributionform.configure.push({
|
|
|
|
|
+ field: "",
|
|
|
|
|
+ isEdit: 0,
|
|
|
|
|
+ label: "",
|
|
|
|
|
+ type: "",
|
|
|
|
|
+ value: "",
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ //开启开关事件
|
|
|
|
|
+ isOpenchange(val) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.attributionform.isOpen = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.attributionform.isOpen = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ //修改开关事件
|
|
|
|
|
+ isEditchange(val, id) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.attributionform.configure[id].isEdit = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.attributionform.configure[id].isEdit = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
//获取选中节点
|
|
//获取选中节点
|
|
|
treechange(data, node) {
|
|
treechange(data, node) {
|
|
|
var treelist = [];
|
|
var treelist = [];
|
|
@@ -193,59 +265,45 @@ export default {
|
|
|
},
|
|
},
|
|
|
//选择保险公司获取归属模板
|
|
//选择保险公司获取归属模板
|
|
|
companyChange(e) {
|
|
companyChange(e) {
|
|
|
- this.$api.insCompany.attributionTemplate(e).then((res) => {
|
|
|
|
|
- if (res.data) {
|
|
|
|
|
- this.fieldslist = JSON.parse(res.data.fields);
|
|
|
|
|
- this.fieldslist.map((ele, index) => {
|
|
|
|
|
- this.attributionform.fields.push({
|
|
|
|
|
- field: ele.field,
|
|
|
|
|
- isEdit: ele.isEdit,
|
|
|
|
|
- label: ele.label,
|
|
|
|
|
- type: ele.type,
|
|
|
|
|
- value: "",
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({ message: "暂无信息", type: "warning"});
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ console.log(e)
|
|
|
|
|
+ // this.$api.insCompany.attributionTemplate(e).then((res) => {
|
|
|
|
|
+ // if (res.data) {
|
|
|
|
|
+ // this.configurelist = JSON.parse(res.data.configure);
|
|
|
|
|
+ // this.configurelist.map((ele, index) => {
|
|
|
|
|
+ // this.attributionform.configure.push({
|
|
|
|
|
+ // field: ele.field,
|
|
|
|
|
+ // isEdit: ele.isEdit,
|
|
|
|
|
+ // label: ele.label,
|
|
|
|
|
+ // type: ele.type,
|
|
|
|
|
+ // value: "",
|
|
|
|
|
+ // });
|
|
|
|
|
+ // })
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.$message({ message: "暂无信息", type: "warning" });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
},
|
|
},
|
|
|
//提交授权
|
|
//提交授权
|
|
|
treesubmit() {
|
|
treesubmit() {
|
|
|
if (this.treeparams.deptIds.length > 0) {
|
|
if (this.treeparams.deptIds.length > 0) {
|
|
|
this.$api.insCompany.authorize(this.treeparams).then((res) => {
|
|
this.$api.insCompany.authorize(this.treeparams).then((res) => {
|
|
|
- if(res.code=='200'){
|
|
|
|
|
|
|
+ if (res.code == '200') {
|
|
|
this.$message({ message: "保存成功", type: "success" });
|
|
this.$message({ message: "保存成功", type: "success" });
|
|
|
- this.empowerdialogVisible=false;
|
|
|
|
|
|
|
+ this.empowerdialogVisible = false;
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message({ message: "未选择归属机构", type: "warning" });
|
|
|
|
|
|
|
+ this.$message({ message: "未选择归属机构", type: "warning" }); attribution
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//提交表单
|
|
//提交表单
|
|
|
submitForm(formName) {
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- let params = {
|
|
|
|
|
- fields: JSON.stringify(this.attributionform.fields),
|
|
|
|
|
- id: this.attributionform.id,
|
|
|
|
|
- insCompanyId: this.attributionform.insCompanyId,
|
|
|
|
|
- password: this.attributionform.password,
|
|
|
|
|
- username: this.attributionform.username,
|
|
|
|
|
- }
|
|
|
|
|
- this.$api.insCompany.attributionsave(params).then((res) => {
|
|
|
|
|
- if (res.code == '200' && !res.msg) {
|
|
|
|
|
- this.$message({ message: '保存成功', type: "success" });
|
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({ message: res.msg, type: "warning" });
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({ message: "请检查信息", type: "warning" });
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ console.log(this.attributionform)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//授权操作
|
|
//授权操作
|
|
@@ -256,9 +314,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
//编辑操作
|
|
//编辑操作
|
|
|
CloseEdit(index, row) {
|
|
CloseEdit(index, row) {
|
|
|
- let fileslist = JSON.parse(row.fields);
|
|
|
|
|
|
|
+ let fileslist = JSON.parse(row.configure);
|
|
|
this.attributionform = {
|
|
this.attributionform = {
|
|
|
- fields: fileslist,
|
|
|
|
|
|
|
+ configure: fileslist,
|
|
|
id: row.id,
|
|
id: row.id,
|
|
|
insCompanyId: row.insCompanyId,
|
|
insCompanyId: row.insCompanyId,
|
|
|
password: row.password,
|
|
password: row.password,
|