[update] 权限

This commit is contained in:
zhaomeijing
2022-06-02 12:09:33 +08:00
parent af2dbe9054
commit bf2e67eaa4
4 changed files with 91 additions and 55 deletions
@@ -52,7 +52,6 @@
size="middle"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange">
@@ -84,6 +83,16 @@
<!-- </span>-->
</a-table>
</div>
<div class="page" style='display: flex; justify-content: flex-end;margin-top: 20px'>
<!-- show-size-changer-->
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
:page-size.sync="pageSize"
:total="total"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
@@ -155,12 +164,27 @@
},
loading:false,
dataSource:[],
total: 0,
pageSize: 10,
pageNo: 1,
}
},
created() {
},
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadDataIndex(page)
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadDataIndex(page,pageSize)
},
handleTableChange(page) {
this.loadDataIndex(page)
},
searchReset() {
this.queryParam = {}
this.loadDataIndex(1);
@@ -169,7 +193,7 @@
this.loadDataIndex(1);
},
loadData(){},
loadDataIndex(arg) {
loadDataIndex(arg,pageSize) {
if (!this.url.list) {
this.$message.error(this.$t('setURLListAttribute'))
return
@@ -182,11 +206,15 @@
//if (this.currentDeptId === '') return;
let params = this.getQueryParams();//查询条件
params.depId = this.currentDeptId;
params.pageNo = arg
if(pageSize !== undefined) {
params.pageSize = pageSize
}
getAction(this.url.list, params).then((res) => {
this.loading = false
if (res.success && res.result) {
this.dataSource = res.result.records || [];
this.ipagination.total = res.result.total;
this.total = res.result.total;
}else{
this.dataSource = []
}
@@ -345,4 +373,7 @@
margin-top: -16px;
margin-bottom: 16px;
}
/deep/.ant-table-pagination{
display: none;
}
</style>
@@ -42,6 +42,9 @@
<a-form-item :label="$t('userName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('enterUserName')" :disabled='isdisabled' v-decorator.trim="[ 'realname', validatorRules.realname]"/>
</a-form-item>
<a-form-item :label="$t('position')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input type="textarea" style='height: 100px' :placeholder="$t('pleaseEnter')+$t('position')" :disabled='isdisabled' v-decorator.trim="[ 'jobTitle', validatorRules.jobTitle]"/>
</a-form-item>
<!--<a-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!--<a-input placeholder="请输入工号" v-decorator.trim="[ 'workNo', validatorRules.workNo]" />-->
@@ -378,7 +381,7 @@
that.visible = true
that.model = Object.assign({}, record)
that.$nextTick(() => {
that.form.setFieldsValue(pick(this.model, 'username', 'sex', 'realname', 'email', 'phone', 'activitiSync', 'workNo', 'telephone', 'post'))
that.form.setFieldsValue(pick(this.model, 'username', 'sex', 'realname', 'jobTitle','email', 'phone', 'activitiSync', 'workNo', 'telephone', 'post'))
})
//身份为上级显示负责部门,否则不显示
if (this.model.userIdentity == '2') {