修改同步更新云内容

This commit is contained in:
caoxinyu
2018-12-24 19:40:56 +08:00
parent b77cc3ad55
commit 795b86c36c
3 changed files with 33 additions and 9 deletions

View File

@@ -228,6 +228,7 @@
<el-form-item label="出生日期" prop="Birthday">
<el-date-picker
v-model="people_form.Birthday"
style="width: 200px"
value-format="yyyy-MM-dd"
size="small"
type="date"
@@ -243,6 +244,7 @@
<el-form-item label="入职时间" prop="TimeOfEntry">
<el-date-picker
v-model="people_form.TimeOfEntry"
style="width: 200px"
value-format="yyyy-MM-dd"
size="small"
type="date"
@@ -289,9 +291,9 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button>
<el-button v-if="people_title === '新增人员'" type="primary" @click="submitAddPeople">确定</el-button>
<el-button v-else-if="people_title === '编辑人员'" type="primary" @click="submitEditPeople">确定</el-button>
<el-button :loading="btnLoading" @click="cancel">取消</el-button>
<el-button v-if="people_title === '新增人员'" :loading="btnLoading" type="primary" @click="submitAddPeople">确定</el-button>
<el-button v-else-if="people_title === '编辑人员'" :loading="btnLoading" type="primary" @click="submitEditPeople">确定</el-button>
</div>
</el-dialog>
@@ -405,6 +407,7 @@ export default {
List: [],
total: null,
nodeName: '',
btnLoading: false,
department_DFV: false,
department_Form: {
DepartmentName: ''
@@ -645,9 +648,11 @@ export default {
}
},
submitAddPeople() {
this.people_DFV = false
this.btnLoading = true
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
this.people_DFV = false
this.i = 0
this.handleNodeClick()
this.$message.success('添加成功')
@@ -675,8 +680,9 @@ export default {
this.people_form.ContactInformation = row.联系电话
},
submitEditPeople() {
this.people_DFV = false
this.btnLoading = true
editPeople(this.people_form.PeopleID, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
if (this.id !== '' && this.Name === '') {
this.handleNodeClick()
@@ -684,6 +690,7 @@ export default {
this.feathPeopleForName()
}
this.$message.success('编辑成功')
this.people_DFV = false
} else {
this.$message.error('编辑失败')
}