Commit a2a55858 authored by 吴婷慧's avatar 吴婷慧

测试问题修改

parent 5e728ea1
......@@ -65,16 +65,6 @@
<script>
import BurtPagination from "@/components/CUSTOMER/pagation";
const columns = [
{ title: "序号", dataIndex: "id", ellipsis: true, width: 150 },
{ title: "工号", dataIndex: "doctorCode", ellipsis: true, width: 95 },
{ title: "医生姓名", dataIndex: "doctorDesc", ellipsis: true, width: 125 },
{ title: "医生英文名", dataIndex: "doctorDescLang1", ellipsis: true, width: 135,},
{ title: "科室", dataIndex: "specialtyList", ellipsis: true, scopedSlots: { customRender: "specialtyList" }, width: 155,},
{ title: "国家/区域", dataIndex: "country", ellipsis: true, width: 110, },
{ title: "语言", dataIndex: "language", ellipsis: true, width: 120 },
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" }, fixed: "right", width: "200px", align: "center", },
];
export default{
props: {
detailObj: {
......@@ -82,6 +72,24 @@ export default{
}
},
data(){
const columns = [
{ title: "序号", dataIndex: "id", ellipsis: true, width: 150 },
{ title: "工号", dataIndex: "doctorCode", ellipsis: true, width: 95 },
{ title: "医生姓名", dataIndex: "doctorDesc", ellipsis: true, width: 125 },
{ title: "医生英文名", dataIndex: "doctorDescLang1", ellipsis: true, width: 135,},
{ title: "科室", dataIndex: "specialtyList", ellipsis: true, scopedSlots: { customRender: "specialtyList" }, width: 180,},
{ title: "国家/区域", dataIndex: "country", ellipsis: true, width: 110, },
{ title: "语言", dataIndex: "language", ellipsis: true, width: 120 },
{ title: "状态", dataIndex: "jobStatus", ellipsis: true, width: 120, customRender: (val) => {
for (let i = 0; i < this.jobStatusCode.length; i ++) {
if (this.jobStatusCode[i].code === val) {
return this.jobStatusCode[i].name
}
}
return val
}},
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" }, fixed: "right", width: "200px", align: "center", },
];
return {
dialogShow: false,
columns,
......@@ -109,6 +117,10 @@ export default{
{ required: true, message: "请选择", trigger: "change" },
],
},
jobStatusCode: [
{ code: '01', name: '在职' },
{ code: '02', name: '离职' }
]
}
},
components: {
......
......@@ -61,7 +61,7 @@
</a-col>
<a-col :md="12">
<a-form-model-item label="福利项目" prop="benefitCode">
<a-select v-model="editForm.benefitCode" show-search allow-clear :filterOption="filterCode">
<a-select v-model="editForm.benefitCode" show-search allow-clear :filterOption="filterCode" :mode="editForm.id ? '' : multiple">
<a-select-option v-for="item in benefitCode" :key="item.benefitCode + item.description" :value="item.benefitCode">
{{ item.description }}
</a-select-option>
......@@ -219,7 +219,7 @@ export default {
};
this._getBenefitCode();
this.editForm = this.$lodash.cloneDeep(data);
// this.editForm.benefitCode = this.editForm.benefitCode ? this.editForm.benefitCode.split(',') : []
this.editForm.benefitCode = this.editForm.benefitCode ? this.editForm.benefitCode.split(',') : this.editForm.benefitCode
this.isBenefitEditShow = true;
console.log(this.editForm)
},
......@@ -238,9 +238,11 @@ export default {
if (!valid) {
return false;
}
// 编辑的时候benefit是单选操作的是String类型 新增的时候为多选 Array类型
const {id, benefitCode} = this.editForm
const data = {
...this.editForm,
// benefitCode: this.editForm.benefitCode.join(',')
benefitCode: id || id === 0 ? benefitCode : benefitCode.join(',')
}
this._editBenefitData(data);
......
......@@ -2,10 +2,10 @@
<div>
<!-- 分类 -->
<div class="classify clearfix">
<a-button @click="specialtyChange('')" :type="!type ? 'primary' : ''">
<a-button @click="specialtyChange(null)" :type="!type || !type.length ? 'primary' : ''">
全部
</a-button>
<a-button @click="specialtyChange(item.specialtyCode)" :type="item.specialtyCode === type ? 'primary' : ''" v-for="item in welfareType" :key="item.specialtyCode">
<a-button @click="specialtyChange(item.specialtyCode)" :type="type.indexOf(item.specialtyCode) > -1 ? 'primary' : ''" v-for="item in welfareType" :key="item.specialtyCode">
{{ item.specialtyDesc }}
</a-button>
<div class="save-btn">
......@@ -56,7 +56,7 @@ export default {
activeKeys: "",
coverageData: [],
expandedRowKeys: [],
type: "",
type: [],
welfareType: [],
pager: {
pageNum: 1,
......@@ -80,7 +80,7 @@ export default {
immediate: true,
deep: true,
handler: function () {
this.type = "";
this.type = [];
this._getCoverageList();
},
},
......@@ -116,7 +116,12 @@ export default {
this.coverageData.splice(index, 1);
},
specialtyChange(code) {
this.type = code;
if (code || code == 0) {
this.type.push(code)
} else {
this.type = [];
}
console.log(code, code || code == 0, this.type)
this._getCoverageList();
},
// 选择框筛选
......@@ -149,7 +154,7 @@ export default {
corpCode,
payorCode,
planCode,
specialtyCode: this.type,
specialtyCode: this.type ? this.type.join(';') : this.type,
}).then((res) => {
this.coverageData = res.content || [];
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment