Commit f82a3521 authored by 黄奎's avatar 黄奎

新增js

parent bbdefc4d
...@@ -468,3 +468,27 @@ export function queryRemarkTypeList() { ...@@ -468,3 +468,27 @@ export function queryRemarkTypeList() {
data: "" data: ""
}); });
} }
/***
* 新增修改行政备注
*/
export function saveAccountRemark(data) {
return request({
url: '/User/SetAccountRemark',
method: 'post',
data
});
}
/**
* 获取行政备注分页列表
*/
export function queryRemarkPage(data)
{
return request({
url: '/user/GetAccountRemarkPageList',
method: 'post',
data
});
}
\ No newline at end of file
<template> <template>
<div class="EmployeeRemark"> <div class="EmployeeRemark">
<q-input filled stack-label maxlength="20" :dense="false" v-model="saveMsg.Content" ref="Content"
<q-input filled stack-label maxlength="20" :dense="false" v-model="saveMsg.EmployeeName" ref="EmployeeName" class="col-6 q-pr-lg q-pb-lg" label="备注信息" />
class="col-6 q-pr-lg q-pb-lg" label="备注信息" :rules="[val => !!val || '请填写备注信息']" /> <q-select filled stack-label option-value="Id" option-label="Name" v-model="saveMsg.RemarkType" ref="RemarkType"
:options="RemarkTypeList" label="内容内心" :dense="false" class="col-3 q-pr-lg " emit-value map-options />
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.Education" <div class="col-3 q-pb-lg q-pt-lg">
ref="Education" :options="RemarkTypeList" label="学历" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value <q-toggle size="md" label="公文" color="primary" :false-value="0" :true-value="1" v-model="saveMsg.IsAddNotice" />
map-options /> </div>
<q-btn label="发布" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="saveRemark" />
<div class="LogList">
<q-timeline>
<template v-for="(item,index) in remarkList">
<q-timeline-entry>
<template v-slot:title>
{{item.CreateStr}}
</template>
<div v-for="(subItem,subIndex) in item.AccountRemarkList">
{{subItem.RemarkType}}(图标) {{subItem.CreateTimeStr}} {{subItem.CreateByName}} {{subItem.Content}}
</div>
</q-timeline-entry>
</template>
</q-timeline>
</div>
</div> </div>
</template> </template>
<script> <script>
import { import {
queryRemarkTypeList queryRemarkTypeList,
saveAccountRemark,
queryRemarkPage
} from '../../../api/school/index' } from '../../../api/school/index'
export default { export default {
props: { props: {
...@@ -25,17 +43,39 @@ ...@@ -25,17 +43,39 @@
data() { data() {
return { return {
saveMsg: { saveMsg: {
EmployeeName: "", Content: "", //备注内容
RemarkType: 1, //内容内心
IsAddNotice: 0, //0-否1-是,是否发布公告
AccountId: 0, //账号表中的AccountId
AccountType: 0, //账号表中的AccountType
},
qMsg: {
PageIndex: 1,
PageSize: 5,
RemarkType: 0, //备注类型
KeyWord: "", //关键字
StartDate: "", //开始日期
EndDate: "", //结束日期
AccountId: 0, //账号表中的AccountId
AccountType: 0, //账号表中的AccountType
}, },
RemarkTypeList: [], //行政备注类型列表 RemarkTypeList: [], //行政备注类型列表
saveLoading: false,
pageCount: 0,
remarkList: [], //备注列表
} }
}, },
created() { created() {
this.getRemarkType(); this.getRemarkType();
console.log("aaa", this.saveObj); if (this.saveObj) {
this.saveMsg.AccountId = this.saveObj.AccountId;
this.saveMsg.AccountType = this.saveObj.AccountType;
this.qMsg.AccountId = this.saveObj.AccountId;
this.qMsg.AccountType = this.saveObj.AccountType;
}
}, },
mounted() { mounted() {
this.getRemarkPage();
}, },
methods: { methods: {
//获取行政备注类型列表 //获取行政备注类型列表
...@@ -43,9 +83,33 @@ ...@@ -43,9 +83,33 @@
queryRemarkTypeList().then(res => { queryRemarkTypeList().then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.RemarkTypeList = res.Data; this.RemarkTypeList = res.Data;
console.log("this.RemarkTypeList", this.RemarkTypeList);
} }
}); });
},
saveRemark() {
this.saveLoading = true;
saveAccountRemark(this.saveMsg).then(res => {
this.saveLoading = false;
if (res.Code == 1) {
this.clearMsg();
this.getRemarkPage();
}
});
},
//清空数据
clearMsg() {
this.saveMsg.Content = "";
this.saveMsg.RemarkType = 1;
this.saveMsg.IsAddNotice = 0;
},
getRemarkPage() {
queryRemarkPage(this.qMsg).then(res => {
if (res.Code == 1) {
this.remarkList = res.Data.PageData;
this.pageCount = res.Data.PageCount
console.log("res", res);
}
})
} }
}, },
} }
......
<template> <template>
<div class="EmployeeDetails"> <div class="EmployeeDetails">
详情 <div>
基础信息<br />
姓名:{{empData.EmployeeName}}
性别:{{empData.SexStr}}
生日:{{empData.BirthDateStr}}
学历:{{empData.EducationStr}}
<br />
电话:{{empData.EmployeeTel}}
身份证:{{empData.IDCard}}
<br />
邮箱:
<br />
住址:{{empData.Address}}
</div>
<div>
职务信息<br />
职位:{{empData.PostName}}
入职时间:{{empData.EntryTime}}
状态:{{empData.LeaveStatusStr}}
<br />
公司:{{empData.SchoolName}}
部门:{{empData.DeptName}}
</div>
</div> </div>
</template> </template>
<script> <script>
import {
queryEmployeeInfo,
} from '../../../api/school/index'
export default { export default {
props: { props: {
saveObj: { saveObj: {
...@@ -15,17 +43,33 @@ ...@@ -15,17 +43,33 @@
name: "EmployeeDetails", name: "EmployeeDetails",
data() { data() {
return { return {
qMsg: {
Id: 0, //账号表中的Id
AccountId: 0, //账号表中的AccountId
AccountType: 0, //账号表中的AccountType
},
empData: {}, //员工信息
} }
}, },
created() { created() {
if (this.saveObj) {
this.qMsg.Id = this.saveObj.Id;
this.qMsg.AccountId = this.saveObj.AccountId;
this.qMsg.AccountType = this.saveObj.AccountType;
}
}, },
mounted() { mounted() {
this.getEmpInfo();
}, },
methods: { methods: {
getEmpInfo() {
queryEmployeeInfo(this.qMsg).then(res => {
if (res.Code == 1) {
this.empData = res.Data;
console.log("this.empData", this.empData);
}
})
}
}, },
} }
......
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