|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<el-card style="margin: 15px">
|
|
<el-card style="margin: 15px">
|
|
- <el-form ref="editform" :rules="rules" label-width="130px" :model="formmodel">
|
|
|
|
|
|
+ <el-form ref="editform" :rules="rules" label-width="140px" :model="formmodel">
|
|
<fieldset>
|
|
<fieldset>
|
|
<legend>{{ this.$t('partInfo.baseInfo') }}</legend>
|
|
<legend>{{ this.$t('partInfo.baseInfo') }}</legend>
|
|
<el-row>
|
|
<el-row>
|
|
@@ -37,10 +37,19 @@
|
|
<el-input v-model="formmodel.member_name"
|
|
<el-input v-model="formmodel.member_name"
|
|
clearable
|
|
clearable
|
|
:maxlength="100"
|
|
:maxlength="100"
|
|
- readonly
|
|
|
|
|
|
+ :readonly="noMember"
|
|
:placeholder="this.$t('partInfo.inputShopMemberName')" />
|
|
:placeholder="this.$t('partInfo.inputShopMemberName')" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col v-if="!noMember" :span="8">
|
|
|
|
+ <el-form-item :label="this.$t('partInfo.shopMemberPassword')" prop="member_password">
|
|
|
|
+ <el-input v-model="formmodel.member_password"
|
|
|
|
+ type="password"
|
|
|
|
+ clearable
|
|
|
|
+ :maxlength="100"
|
|
|
|
+ :placeholder="this.$t('partInfo.inputShopMemberPassword')" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item :label="this.$t('partInfo.shopParentId')" prop="parent_id">
|
|
<el-form-item :label="this.$t('partInfo.shopParentId')" prop="parent_id">
|
|
<el-select v-model="formmodel.parent_id" :placeholder="this.$t('partInfo.choiceShopParentId')" clearable>
|
|
<el-select v-model="formmodel.parent_id" :placeholder="this.$t('partInfo.choiceShopParentId')" clearable>
|
|
@@ -343,6 +352,26 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
|
+ <el-form-item :label="this.$t('partInfo.doorNurseTitle')">
|
|
|
|
+ <el-input v-model="formmodel.door_nurse_title" :label="this.$t('partInfo.doorNurseTitle')" :maxlength="15" >
|
|
|
|
+ <el-select v-model="formmodel.door_nurse_valid" slot="prepend" :placeholder="this.$t('action.choice')">
|
|
|
|
+ <el-option :label="this.$t('partInfo.display')" :value="1"></el-option>
|
|
|
|
+ <el-option :label="this.$t('partInfo.onDisplay')" :value="0"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item :label="this.$t('partInfo.doorNursingTitle')">
|
|
|
|
+ <el-input v-model="formmodel.door_nursing_title" :label="this.$t('partInfo.doorNursingTitle')" :maxlength="15" >
|
|
|
|
+ <el-select v-model="formmodel.door_nursing_valid" slot="prepend" :placeholder="this.$t('action.choice')">
|
|
|
|
+ <el-option :label="this.$t('partInfo.display')" :value="1" />
|
|
|
|
+ <el-option :label="this.$t('partInfo.onDisplay')" :value="0" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
<el-form-item :label="this.$t('partInfo.upSeconds')">
|
|
<el-form-item :label="this.$t('partInfo.upSeconds')">
|
|
<el-input-number v-model="formmodel.up_seconds" :min="1" :max="300" :label="this.$t('partInfo.upSeconds')" />
|
|
<el-input-number v-model="formmodel.up_seconds" :min="1" :max="300" :label="this.$t('partInfo.upSeconds')" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -386,8 +415,13 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- formmodel: {},
|
|
|
|
- rules: {},
|
|
|
|
|
|
+ formmodel: {
|
|
|
|
+ },
|
|
|
|
+ rules: {
|
|
|
|
+ // member_password: [
|
|
|
|
+ // { required: true, message: this.$t('partInfo.inputShopMemberPassword'), trigger: 'blur' }
|
|
|
|
+ // ]
|
|
|
|
+ },
|
|
dayStart: new Date(2020, 11, 11, 7, 0),
|
|
dayStart: new Date(2020, 11, 11, 7, 0),
|
|
nightStart: new Date(2020, 11, 11, 18, 0),
|
|
nightStart: new Date(2020, 11, 11, 18, 0),
|
|
nurseLevel0Config: [],
|
|
nurseLevel0Config: [],
|
|
@@ -397,6 +431,7 @@ export default {
|
|
partRoles: [],
|
|
partRoles: [],
|
|
systemConfig: {},
|
|
systemConfig: {},
|
|
formmodelAdmin: {},
|
|
formmodelAdmin: {},
|
|
|
|
+ noMember: true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
@@ -412,6 +447,11 @@ export default {
|
|
if (this.partId) {
|
|
if (this.partId) {
|
|
API_Part.getPartSetting(this.partId).then(res => {
|
|
API_Part.getPartSetting(this.partId).then(res => {
|
|
this.formmodel = { ...res }
|
|
this.formmodel = { ...res }
|
|
|
|
+ if (!this.formmodel.member_name || this.formmodel.member_name === '') {
|
|
|
|
+ this.noMember = false
|
|
|
|
+ } else {
|
|
|
|
+ this.noMember = true
|
|
|
|
+ }
|
|
if (!this.formmodel.id) {
|
|
if (!this.formmodel.id) {
|
|
this.formmodel = {
|
|
this.formmodel = {
|
|
...this.formmodel, ...{
|
|
...this.formmodel, ...{
|
|
@@ -450,7 +490,11 @@ export default {
|
|
communication_mode_mobile: 1,
|
|
communication_mode_mobile: 1,
|
|
customize_role_call_first: 0,
|
|
customize_role_call_first: 0,
|
|
customize_role_call_second: 0,
|
|
customize_role_call_second: 0,
|
|
- auto_accept: 0
|
|
|
|
|
|
+ auto_accept: 0,
|
|
|
|
+ door_nurse_title: '呼叫护士',
|
|
|
|
+ door_nurse_valid: 1,
|
|
|
|
+ door_nursing_title: '进入护理',
|
|
|
|
+ door_nursing_valid: 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -465,6 +509,10 @@ export default {
|
|
this.formmodel.doctor_valid = res.doctor_valid
|
|
this.formmodel.doctor_valid = res.doctor_valid
|
|
this.formmodel.nurse_title = res.nurse_title
|
|
this.formmodel.nurse_title = res.nurse_title
|
|
this.formmodel.nurse_valid = res.nurse_valid
|
|
this.formmodel.nurse_valid = res.nurse_valid
|
|
|
|
+ // this.formmodel.door_nurse_title = res.door_nurse_title
|
|
|
|
+ // this.formmodel.door_nurse_valid = res.door_nurse_valid
|
|
|
|
+ // this.formmodel.door_nursing_title = res.door_nursing_title
|
|
|
|
+ // this.formmodel.door_nursing_valid = res.door_nursing_valid
|
|
this.formmodel.up_seconds = res.up_seconds
|
|
this.formmodel.up_seconds = res.up_seconds
|
|
API_SystemConfig.getConfig('groupHostTransferSeconds').then(r => {
|
|
API_SystemConfig.getConfig('groupHostTransferSeconds').then(r => {
|
|
this.systemConfig = r
|
|
this.systemConfig = r
|
|
@@ -503,11 +551,21 @@ export default {
|
|
if (this.nightStart) {
|
|
if (this.nightStart) {
|
|
this.formmodel.night_start = this.nightStart.toLocaleTimeString('chinese', { hour12: false })
|
|
this.formmodel.night_start = this.nightStart.toLocaleTimeString('chinese', { hour12: false })
|
|
}
|
|
}
|
|
|
|
+ if (this.formmodel.member_password) {
|
|
|
|
+ let params = {}
|
|
|
|
+ params.shop_id = this.partId
|
|
|
|
+ params.member_name = this.formmodel.member_name
|
|
|
|
+ params.member_password = this.formmodel.member_password
|
|
|
|
+ API_Part.editShopMember(params).then(res => {
|
|
|
|
+ this.$message.success(this.$t('action.saveSuccess'))
|
|
|
|
+ this.noMember = true
|
|
|
|
+ })
|
|
|
|
+ }
|
|
API_Part.editPartSetting(this.formmodel, this.partId).then(res => {
|
|
API_Part.editPartSetting(this.formmodel, this.partId).then(res => {
|
|
- this.$message.success(this.$t('action.saveSuccess') + '')
|
|
|
|
|
|
+ this.$message.success(this.$t('action.saveSuccess'))
|
|
if (this.systemConfig.id != null) {
|
|
if (this.systemConfig.id != null) {
|
|
API_SystemConfig.update(this.systemConfig.id, this.systemConfig).then(res => {
|
|
API_SystemConfig.update(this.systemConfig.id, this.systemConfig).then(res => {
|
|
- this.$message.success(this.$t('action.saveSuccess') + '')
|
|
|
|
|
|
+ this.$message.success(this.$t('action.saveSuccess'))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|