修改同步更新云内容
This commit is contained in:
@@ -36,3 +36,14 @@ export function editPassword(num1, num2, num3, num4) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function cloudEditPassword(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '人事档案管理_人员名单_云上改密码',
|
||||
param: 'id=' + num1 + '=int&新密码=' + num2 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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('编辑失败')
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { isvalidUsername } from '@/utils/validate'
|
||||
import { editPassword } from '@/api/login'
|
||||
import { editPassword, cloudEditPassword } from '@/api/login'
|
||||
import Cookie from 'js-cookie'
|
||||
export default {
|
||||
name: 'Login',
|
||||
@@ -230,14 +230,20 @@ export default {
|
||||
editPassword(this.form.Account, this.form.beforPassword, this.form.newPassword, 5).then(response => {
|
||||
if (response.data.result[0].result === '1') {
|
||||
if (response.data.output[0].返回 === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogFormVisible = false
|
||||
cloudEditPassword(this.form.Account, this.form.newPassword).then(response => {
|
||||
console.log(response, 333)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogFormVisible = false
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('用户名或密码不正确')
|
||||
}
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user