Commit 799ebf75 authored by 黄奎's avatar 黄奎

页面修改

parent ae7e7706
...@@ -11,3 +11,16 @@ export function resetPassword(data) { ...@@ -11,3 +11,16 @@ export function resetPassword(data) {
data data
}) })
} }
/**
* 获取员工列表
* @param {查询参数} data
*/
export function queryEmployee(data)
{
return request({
url: '/user/GetEmployeeList',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -25,10 +25,6 @@ ...@@ -25,10 +25,6 @@
</q-uploader> </q-uploader>
</div> </div>
</div> </div>
<div class="text-caption q-my-md q-px-xs text-grey-6">选择角色</div>
<div class="q-pa-md">
<q-option-group type="checkbox" :options="roleList" v-model="tempRole" emit-value map-options />
</div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -45,10 +41,6 @@ ...@@ -45,10 +41,6 @@
saveManager, saveManager,
queryManagerInfo queryManagerInfo
} from '../../../api/school/index' } from '../../../api/school/index'
import {
queryRoleDropdown
}
from '../../../api/system/index'
//部门 //部门
import { import {
getDeptTree getDeptTree
...@@ -87,9 +79,7 @@ ...@@ -87,9 +79,7 @@
}, },
optionTitle: "", optionTitle: "",
schoolList: [], schoolList: [],
roleList: [], //角色列表
saveLoading: false, saveLoading: false,
tempRole: [],
DeptList: [], //部门列表 DeptList: [], //部门列表
PostList: [], //岗位列表 PostList: [], //岗位列表
returnString: [], //默认岗位 returnString: [], //默认岗位
...@@ -98,7 +88,6 @@ ...@@ -98,7 +88,6 @@
created() { created() {
this.queryDeptTree(); this.queryDeptTree();
this.queryPostList(); this.queryPostList();
this.getrolelist();
this.getSchool(); this.getSchool();
}, },
mounted() { mounted() {
...@@ -135,20 +124,6 @@ ...@@ -135,20 +124,6 @@
} }
}) })
}, },
getrolelist() {
queryRoleDropdown({}).then(res => {
if (res.Code == 1) {
if (res.Data && res.Data.length > 0) {
res.Data.forEach(item => {
this.roleList.push({
label: item.RoleName,
value: item.RoleId
});
})
}
}
})
},
initObj() { initObj() {
if (this.saveObj) { if (this.saveObj) {
this.optionTitle = "修改管理者信息" this.optionTitle = "修改管理者信息"
...@@ -164,6 +139,9 @@ ...@@ -164,6 +139,9 @@
this.objOption.Dept_Id = res.Data.Dept_Id; this.objOption.Dept_Id = res.Data.Dept_Id;
this.returnString.push(res.Data.Dept_Id.toString()); this.returnString.push(res.Data.Dept_Id.toString());
this.tempRole = res.Data.RoleList; this.tempRole = res.Data.RoleList;
if (this.objOption.Dept_Id && this.objOption.Dept_Id > 0) {
this.queryPostList();
}
this.$forceUpdate(); this.$forceUpdate();
}) })
} else { } else {
......
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
class="col-6 q-pb-lg" label="校区联系电话" :rules="[val => !!val || '请填写校区联系电话']" /> class="col-6 q-pb-lg" label="校区联系电话" :rules="[val => !!val || '请填写校区联系电话']" />
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Remark" <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Remark"
class="col-6 q-pb-lg q-pr-lg" label="校区备注" /> class="col-6 q-pb-lg q-pr-lg" label="校区备注" />
<selectTree v-if="DeptList&&DeptList.length>0" :treeData='DeptList' :defaultArray="returnString"
nodeKey="DeptId" :multiple="false" labelKey="DeptName" childrenKey="ChildList" tipText="所属部门"
@getChild="getChild" classStr="col-6 q-pr-lg q-pb-lg"></selectTree>
<div class="col-6"> <div class="col-6">
<q-toggle size="md" label="校区状态" color="primary" :false-value="1" :true-value="0" <q-toggle size="md" label="校区状态" color="primary" :false-value="1" :true-value="0"
v-model="objOption.Status" /> v-model="objOption.Status" />
...@@ -101,10 +104,18 @@ ...@@ -101,10 +104,18 @@
getSchoolPage, getSchoolPage,
saveSchool saveSchool
} from '../../api/school/index' } from '../../api/school/index'
//部门
import {
getDeptTree
} from '../../api/system/dept'
import selectTree from '../../components/common/select-tree'
export default { export default {
meta: { meta: {
title: "校区管理" title: "校区管理"
}, },
components: {
selectTree
},
data() { data() {
return { return {
currentUrl: "", currentUrl: "",
...@@ -124,6 +135,13 @@ ...@@ -124,6 +135,13 @@
align: 'left', align: 'left',
sortable: true sortable: true
}, },
{
name: 'DeptName',
label: '所属部门',
field: 'DeptName',
align: 'left',
sortable: true
},
{ {
name: 'SLinkMan', name: 'SLinkMan',
label: '负责人', label: '负责人',
...@@ -192,11 +210,25 @@ ...@@ -192,11 +210,25 @@
StatusTemp: {}, StatusTemp: {},
pageCount: 0, pageCount: 0,
persistent: false, persistent: false,
objOption: {}, objOption: {
saveLoading: false SId: 0,
SName: "",
SAddress: "",
SLinkMan: "",
SLinkTel: "",
SDomain: "",
SLogo: "",
Remark: "",
Status: '0',
Dept_Id: 0, //管理部门
},
saveLoading: false,
DeptList: [], //部门列表
returnString: [], //默认值
} }
}, },
created() { created() {
this.queryDeptTree();
this.StatusTemp = this.StatusOpts[0] this.StatusTemp = this.StatusOpts[0]
}, },
mounted() { mounted() {
...@@ -204,9 +236,25 @@ ...@@ -204,9 +236,25 @@
this.getSchool() this.getSchool()
}, },
methods: { methods: {
getChild(deptArray) {
var tempStr = "";
if (deptArray && deptArray != '') {
tempStr = deptArray;
}
this.objOption.Dept_Id = tempStr;
},
//获取部门结构树
queryDeptTree() {
getDeptTree({}).then(res => {
if (res.Code == 1) {
this.DeptList = res.Data;
}
})
},
onItemClick() { onItemClick() {
}, },
//初始化对象
initObj(id) { initObj(id) {
if (id) { if (id) {
let obj = this.data.filter(x => { let obj = this.data.filter(x => {
...@@ -215,40 +263,42 @@ ...@@ -215,40 +263,42 @@
} }
return false return false
}) })
this.objOption = obj[0] this.objOption = obj[0];
this.returnString.push(this.objOption.Dept_Id.toString());
} else { } else {
this.objOption = { this.objOption.SId = 0;
SId: 0, this.objOption.SName = "";
SName: "", this.objOption.SAddress = "";
SAddress: "", this.objOption.SLinkMan = "";
SLinkMan: "", this.objOption.SLinkTel = "";
SLinkTel: "", this.objOption.SDomain = "";
SDomain: "", this.objOption.SLogo = "";
SLogo: "", this.objOption.Remark = "";
Remark: "", this.objOption.Status = "0";
Status: '0' this.objOption.Dept_Id = 0;
}
} }
this.persistent = true this.persistent = true;
}, },
//重新查询
resetSearch() { resetSearch() {
this.msg.pageIndex = 1 this.msg.pageIndex = 1
this.loading = true this.loading = true
this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1' this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1'
this.getSchool() this.getSchool()
}, },
//分页改变
changePage(val) { changePage(val) {
this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1' this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1'
this.msg.pageIndex = val this.msg.pageIndex = val
this.loading = true this.loading = true
this.getSchool() this.getSchool()
}, },
//获取学校分页列表
getSchool() { getSchool() {
getSchoolPage(this.msg).then(res => { getSchoolPage(this.msg).then(res => {
this.loading = false this.loading = false
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
this.pageCount = res.Data.PageCount
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
...@@ -256,6 +306,7 @@ ...@@ -256,6 +306,7 @@
closeSaveForm() { closeSaveForm() {
this.persistent = false this.persistent = false
}, },
//保存校区
saveSchool() { saveSchool() {
this.saveLoading = true this.saveLoading = true
this.$refs.SName.validate() this.$refs.SName.validate()
......
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