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

测试问题修改

parent 5e728ea1
...@@ -65,16 +65,6 @@ ...@@ -65,16 +65,6 @@
<script> <script>
import BurtPagination from "@/components/CUSTOMER/pagation"; 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{ export default{
props: { props: {
detailObj: { detailObj: {
...@@ -82,6 +72,24 @@ export default{ ...@@ -82,6 +72,24 @@ export default{
} }
}, },
data(){ 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 { return {
dialogShow: false, dialogShow: false,
columns, columns,
...@@ -109,6 +117,10 @@ export default{ ...@@ -109,6 +117,10 @@ export default{
{ required: true, message: "请选择", trigger: "change" }, { required: true, message: "请选择", trigger: "change" },
], ],
}, },
jobStatusCode: [
{ code: '01', name: '在职' },
{ code: '02', name: '离职' }
]
} }
}, },
components: { components: {
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</a-col> </a-col>
<a-col :md="12"> <a-col :md="12">
<a-form-model-item label="福利项目" prop="benefitCode"> <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"> <a-select-option v-for="item in benefitCode" :key="item.benefitCode + item.description" :value="item.benefitCode">
{{ item.description }} {{ item.description }}
</a-select-option> </a-select-option>
...@@ -219,7 +219,7 @@ export default { ...@@ -219,7 +219,7 @@ export default {
}; };
this._getBenefitCode(); this._getBenefitCode();
this.editForm = this.$lodash.cloneDeep(data); 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; this.isBenefitEditShow = true;
console.log(this.editForm) console.log(this.editForm)
}, },
...@@ -238,9 +238,11 @@ export default { ...@@ -238,9 +238,11 @@ export default {
if (!valid) { if (!valid) {
return false; return false;
} }
// 编辑的时候benefit是单选操作的是String类型 新增的时候为多选 Array类型
const {id, benefitCode} = this.editForm
const data = { const data = {
...this.editForm, ...this.editForm,
// benefitCode: this.editForm.benefitCode.join(',') benefitCode: id || id === 0 ? benefitCode : benefitCode.join(',')
} }
this._editBenefitData(data); this._editBenefitData(data);
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<div> <div>
<!-- 分类 --> <!-- 分类 -->
<div class="classify clearfix"> <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>
<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 }} {{ item.specialtyDesc }}
</a-button> </a-button>
<div class="save-btn"> <div class="save-btn">
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
activeKeys: "", activeKeys: "",
coverageData: [], coverageData: [],
expandedRowKeys: [], expandedRowKeys: [],
type: "", type: [],
welfareType: [], welfareType: [],
pager: { pager: {
pageNum: 1, pageNum: 1,
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
immediate: true, immediate: true,
deep: true, deep: true,
handler: function () { handler: function () {
this.type = ""; this.type = [];
this._getCoverageList(); this._getCoverageList();
}, },
}, },
...@@ -116,7 +116,12 @@ export default { ...@@ -116,7 +116,12 @@ export default {
this.coverageData.splice(index, 1); this.coverageData.splice(index, 1);
}, },
specialtyChange(code) { 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(); this._getCoverageList();
}, },
// 选择框筛选 // 选择框筛选
...@@ -149,7 +154,7 @@ export default { ...@@ -149,7 +154,7 @@ export default {
corpCode, corpCode,
payorCode, payorCode,
planCode, planCode,
specialtyCode: this.type, specialtyCode: this.type ? this.type.join(';') : this.type,
}).then((res) => { }).then((res) => {
this.coverageData = res.content || []; 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