|
|
|
@ -7,7 +7,7 @@
|
|
|
|
:visible.sync="visible"
|
|
|
|
:visible.sync="visible"
|
|
|
|
append-to-body
|
|
|
|
append-to-body
|
|
|
|
:before-close="handleClose"
|
|
|
|
:before-close="handleClose"
|
|
|
|
@close="$emit('update:visible',false)"
|
|
|
|
@close="$emit('update:isShow', false)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<section class="drawer-container">
|
|
|
|
<section class="drawer-container">
|
|
|
|
<vxe-table
|
|
|
|
<vxe-table
|
|
|
|
@ -17,39 +17,67 @@
|
|
|
|
style="margin-top: 10px"
|
|
|
|
style="margin-top: 10px"
|
|
|
|
:loading="loading"
|
|
|
|
:loading="loading"
|
|
|
|
:max-height="600"
|
|
|
|
:max-height="600"
|
|
|
|
|
|
|
|
:min-height="300"
|
|
|
|
keep-source
|
|
|
|
keep-source
|
|
|
|
show-overflow
|
|
|
|
show-overflow
|
|
|
|
:scroll-y="{ enabled: true, gt: 0 }"
|
|
|
|
:scroll-y="{ enabled: true, gt: 0 }"
|
|
|
|
:radio-config="{ labelField: 'name', highlight: true }"
|
|
|
|
:radio-config="{ highlight: true }"
|
|
|
|
:row-config="{ isCurrent: true, isHover: true }"
|
|
|
|
:row-config="{ isCurrent: true, isHover: true }"
|
|
|
|
:column-config="{ resizable: true }"
|
|
|
|
:column-config="{ resizable: true }"
|
|
|
|
:data="nurses"
|
|
|
|
:data="nurses"
|
|
|
|
|
|
|
|
:filter-config="{}"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<vxe-column type="radio" field="name" width="200" title="护工姓名" header-align="center" />
|
|
|
|
<vxe-column type="radio" width="64" align="center" fixed="left" />
|
|
|
|
<vxe-column type="seq" width="58" align="center" />
|
|
|
|
<vxe-column type="seq" width="58" align="center" />
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
|
|
|
|
field="name"
|
|
|
|
|
|
|
|
width="200"
|
|
|
|
|
|
|
|
title="护工姓名"
|
|
|
|
|
|
|
|
header-align="center"
|
|
|
|
|
|
|
|
:filters="nameOptions"
|
|
|
|
|
|
|
|
:filter-method="nameFilterMethod"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #filter="{ column }">
|
|
|
|
|
|
|
|
<el-input v-for="(option, index) in column.filters" :key="index" v-model="option.data" size="mini" type="type" clearable @input="changeFilterEvent(option)" />
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
header-align="center"
|
|
|
|
header-align="center"
|
|
|
|
field="mobile"
|
|
|
|
field="mobile"
|
|
|
|
width="160"
|
|
|
|
width="160"
|
|
|
|
title="手机号"
|
|
|
|
title="手机号"
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
|
|
|
|
:filters="mobileOptions"
|
|
|
|
/>
|
|
|
|
:filter-method="nameFilterMethod"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #filter="{ column }">
|
|
|
|
|
|
|
|
<el-input v-for="(option, index) in column.filters" :key="index" v-model="option.data" size="mini" type="type" clearable @input="changeFilterEvent(option)" />
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
header-align="center"
|
|
|
|
header-align="center"
|
|
|
|
field="idcard"
|
|
|
|
field="idcard"
|
|
|
|
width="160"
|
|
|
|
width="160"
|
|
|
|
title="身份证号"
|
|
|
|
title="身份证号"
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
|
|
|
|
:filters="idcardOptions"
|
|
|
|
/>
|
|
|
|
:filter-method="nameFilterMethod"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #filter="{ column }">
|
|
|
|
|
|
|
|
<el-input v-for="(option, index) in column.filters" :key="index" v-model="option.data" size="mini" type="type" clearable @input="changeFilterEvent(option)" />
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
field="sex"
|
|
|
|
field="sex"
|
|
|
|
width="180"
|
|
|
|
width="180"
|
|
|
|
title="性别"
|
|
|
|
title="性别"
|
|
|
|
:edit-render="{ name: 'VxeSelect', options: [{'value':1,'label':'男'},{'value':0,'label':'女'}], props: { multiple: false }, optionProps: { value: 'value', label: 'label' } }"
|
|
|
|
:filters="[
|
|
|
|
|
|
|
|
{ label: '男', value: '1' },
|
|
|
|
|
|
|
|
{ label: '女', value: '0' }
|
|
|
|
|
|
|
|
]"
|
|
|
|
|
|
|
|
:filter-multiple="false"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -57,7 +85,6 @@
|
|
|
|
field="birthday"
|
|
|
|
field="birthday"
|
|
|
|
width="180"
|
|
|
|
width="180"
|
|
|
|
title="生日"
|
|
|
|
title="生日"
|
|
|
|
:edit-render="{ name: 'VxeDatePicker', props: { type: 'date' } }"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -65,7 +92,6 @@
|
|
|
|
field="hometown"
|
|
|
|
field="hometown"
|
|
|
|
width="160"
|
|
|
|
width="160"
|
|
|
|
title="家乡"
|
|
|
|
title="家乡"
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -73,7 +99,6 @@
|
|
|
|
field="address"
|
|
|
|
field="address"
|
|
|
|
width="160"
|
|
|
|
width="160"
|
|
|
|
title="地址"
|
|
|
|
title="地址"
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -81,7 +106,6 @@
|
|
|
|
field="emergency_phone"
|
|
|
|
field="emergency_phone"
|
|
|
|
width="160"
|
|
|
|
width="160"
|
|
|
|
title="紧急联系电话"
|
|
|
|
title="紧急联系电话"
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -90,7 +114,6 @@
|
|
|
|
field="work_years"
|
|
|
|
field="work_years"
|
|
|
|
width="160"
|
|
|
|
width="160"
|
|
|
|
title="年限"
|
|
|
|
title="年限"
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'number' } }"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -98,7 +121,6 @@
|
|
|
|
field="join_at"
|
|
|
|
field="join_at"
|
|
|
|
width="180"
|
|
|
|
width="180"
|
|
|
|
title="加入时间"
|
|
|
|
title="加入时间"
|
|
|
|
:edit-render="{ name: 'VxeDatePicker', props: { type: 'date' } }"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -114,7 +136,15 @@
|
|
|
|
field="work_status"
|
|
|
|
field="work_status"
|
|
|
|
width="180"
|
|
|
|
width="180"
|
|
|
|
title="工作状态"
|
|
|
|
title="工作状态"
|
|
|
|
:edit-render="{ name: 'VxeSelect', options: [{'value':1,'label':'兼职'},{'value':2,'label':'全职'}], props: { multiple: false }, optionProps: { value: 'value', label: 'label' } }"
|
|
|
|
:edit-render="{
|
|
|
|
|
|
|
|
name: 'VxeSelect',
|
|
|
|
|
|
|
|
options: [
|
|
|
|
|
|
|
|
{ value: 1, label: '兼职' },
|
|
|
|
|
|
|
|
{ value: 2, label: '全职' },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
props: { multiple: false },
|
|
|
|
|
|
|
|
optionProps: { value: 'value', label: 'label' },
|
|
|
|
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -122,7 +152,15 @@
|
|
|
|
field="status"
|
|
|
|
field="status"
|
|
|
|
width="180"
|
|
|
|
width="180"
|
|
|
|
title="状态"
|
|
|
|
title="状态"
|
|
|
|
:edit-render="{ name: 'VxeSelect', options: [{'value':0,'label':'请假'},{'value':1,'label':'正常服务'}], props: { multiple: false }, optionProps: { value: 'value', label: 'label' } }"
|
|
|
|
:edit-render="{
|
|
|
|
|
|
|
|
name: 'VxeSelect',
|
|
|
|
|
|
|
|
options: [
|
|
|
|
|
|
|
|
{ value: 0, label: '请假' },
|
|
|
|
|
|
|
|
{ value: 1, label: '正常服务' },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
props: { multiple: false },
|
|
|
|
|
|
|
|
optionProps: { value: 'value', label: 'label' },
|
|
|
|
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -130,7 +168,13 @@
|
|
|
|
field="has_social_insurance"
|
|
|
|
field="has_social_insurance"
|
|
|
|
width="140"
|
|
|
|
width="140"
|
|
|
|
title="是否有社保"
|
|
|
|
title="是否有社保"
|
|
|
|
:edit-render="{ name: 'VxeSelect', options: [{ label: '是', value: 1 },{ label: '否', value: 0 }] }"
|
|
|
|
:edit-render="{
|
|
|
|
|
|
|
|
name: 'VxeSelect',
|
|
|
|
|
|
|
|
options: [
|
|
|
|
|
|
|
|
{ label: '是', value: 1 },
|
|
|
|
|
|
|
|
{ label: '否', value: 0 },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
@ -138,13 +182,21 @@
|
|
|
|
field="has_qualification"
|
|
|
|
field="has_qualification"
|
|
|
|
width="140"
|
|
|
|
width="140"
|
|
|
|
title="是否有资质"
|
|
|
|
title="是否有资质"
|
|
|
|
:edit-render="{ name: 'VxeSelect', options: [{ label: '是', value: 1 },{ label: '否', value: 0 }] }"
|
|
|
|
:edit-render="{
|
|
|
|
|
|
|
|
name: 'VxeSelect',
|
|
|
|
|
|
|
|
options: [
|
|
|
|
|
|
|
|
{ label: '是', value: 1 },
|
|
|
|
|
|
|
|
{ label: '否', value: 0 },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</vxe-table>
|
|
|
|
</vxe-table>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="drawer-container__footer">
|
|
|
|
<div class="drawer-container__footer">
|
|
|
|
<el-button type="primary" :loading="loading" @click="submit">{{ loading ? '提交中 ...' : '确 定' }}</el-button>
|
|
|
|
<el-button type="primary" :loading="loading" @click="submit">{{
|
|
|
|
|
|
|
|
loading ? "提交中 ..." : "确 定"
|
|
|
|
|
|
|
|
}}</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-drawer>
|
|
|
|
</el-drawer>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -154,7 +206,7 @@
|
|
|
|
import { save } from '@/api/accompany-order/accompany-order'
|
|
|
|
import { save } from '@/api/accompany-order/accompany-order'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
visible: {
|
|
|
|
isShow: {
|
|
|
|
type: Boolean,
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -165,31 +217,70 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
nameOptions: [{ data: '' }],
|
|
|
|
|
|
|
|
mobileOptions: [{ data: '' }],
|
|
|
|
|
|
|
|
idcardOptions: [{ data: '' }],
|
|
|
|
row: {},
|
|
|
|
row: {},
|
|
|
|
loading: false
|
|
|
|
loading: false,
|
|
|
|
|
|
|
|
visible: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {},
|
|
|
|
computed: {},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
'row': {
|
|
|
|
|
|
|
|
handler: function(newVal) {
|
|
|
|
|
|
|
|
if (newVal.nurse_id && this.isShow) {
|
|
|
|
|
|
|
|
this.$nextTick((_) => {
|
|
|
|
|
|
|
|
this.$refs['table'].setRadioRow(
|
|
|
|
|
|
|
|
this.nurses.find((i) => i.id === newVal.nurse_id)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
deep: true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
isShow(newVal) {
|
|
|
|
|
|
|
|
this.visible = newVal
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
visible(newVal) {
|
|
|
|
|
|
|
|
this.$emit('update:isShow', newVal)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
changeFilterEvent(option) {
|
|
|
|
|
|
|
|
const $table = this.$refs.table
|
|
|
|
|
|
|
|
if ($table) {
|
|
|
|
|
|
|
|
$table.updateFilterOptionStatus(option, !!option.data)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
nameFilterMethod({ option, cellValue }) {
|
|
|
|
|
|
|
|
const regex = new RegExp(option.data.split('').join('.*'), 'i')
|
|
|
|
|
|
|
|
return regex.test(cellValue)
|
|
|
|
|
|
|
|
},
|
|
|
|
handleClose(done) {
|
|
|
|
handleClose(done) {
|
|
|
|
this.$confirm('确定关闭窗口?')
|
|
|
|
this.$confirm('确定关闭窗口?')
|
|
|
|
.then(_ => {
|
|
|
|
.then((_) => {
|
|
|
|
|
|
|
|
this.$refs['table'].clearRadioRow()
|
|
|
|
done()
|
|
|
|
done()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(_ => {})
|
|
|
|
.catch((_) => {})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
submit() {
|
|
|
|
submit() {
|
|
|
|
|
|
|
|
this.$confirm('确定分配?')
|
|
|
|
|
|
|
|
.then((_) => {
|
|
|
|
if (this.row.id && this.$refs['table'].getRadioRecord(true)) {
|
|
|
|
if (this.row.id && this.$refs['table'].getRadioRecord(true)) {
|
|
|
|
save({
|
|
|
|
save({
|
|
|
|
id: this.row.id,
|
|
|
|
id: this.row.id,
|
|
|
|
nurse_id: this.$refs['table'].getRadioRecord(true).id,
|
|
|
|
nurse_id: this.$refs['table'].getRadioRecord(true).id,
|
|
|
|
status: 0
|
|
|
|
status: 0
|
|
|
|
}).then(_ => {
|
|
|
|
}).then((_) => {
|
|
|
|
this.$message.success('分配成功!')
|
|
|
|
this.$message.success('分配成功!')
|
|
|
|
this.$emit('update:visible', false)
|
|
|
|
this.$emit('update:visible', false)
|
|
|
|
this.$emit('refresh')
|
|
|
|
this.$emit('refresh')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((_) => {})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|