[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
+1
View File
@@ -902,6 +902,7 @@ module.exports = {
systemPrompt:'System Prompt', systemPrompt:'System Prompt',
loginExpired:'Login Expired', loginExpired:'Login Expired',
reportNotUploaded:'Report not uploaded', reportNotUploaded:'Report not uploaded',
position: 'position',
// 认证权限状态 // 认证权限状态
CollectionInitiated: 'Collection to be initiated、', CollectionInitiated: 'Collection to be initiated、',
handledInterface: 'To be handled by the project interface、', handledInterface: 'To be handled by the project interface、',
+1
View File
@@ -908,6 +908,7 @@ module.exports = {
systemPrompt:'系统提示', systemPrompt:'系统提示',
loginExpired:'登录已过期', loginExpired:'登录已过期',
reportNotUploaded:'报告未上传', reportNotUploaded:'报告未上传',
position: '职位',
// 认证权限状态 // 认证权限状态
CollectionInitiated: '待发起收集、', CollectionInitiated: '待发起收集、',
handledInterface: '待工程接口人处理、', handledInterface: '待工程接口人处理、',
@@ -52,7 +52,6 @@
size="middle" size="middle"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination"
:loading="loading" :loading="loading"
@change="handleTableChange"> @change="handleTableChange">
@@ -84,6 +83,16 @@
<!-- </span>--> <!-- </span>-->
</a-table> </a-table>
</div> </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 --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
@@ -155,12 +164,27 @@
}, },
loading:false, loading:false,
dataSource:[], dataSource:[],
total: 0,
pageSize: 10,
pageNo: 1,
} }
}, },
created() { created() {
}, },
methods: { 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() { searchReset() {
this.queryParam = {} this.queryParam = {}
this.loadDataIndex(1); this.loadDataIndex(1);
@@ -169,7 +193,7 @@
this.loadDataIndex(1); this.loadDataIndex(1);
}, },
loadData(){}, loadData(){},
loadDataIndex(arg) { loadDataIndex(arg,pageSize) {
if (!this.url.list) { if (!this.url.list) {
this.$message.error(this.$t('setURLListAttribute')) this.$message.error(this.$t('setURLListAttribute'))
return return
@@ -182,11 +206,15 @@
//if (this.currentDeptId === '') return; //if (this.currentDeptId === '') return;
let params = this.getQueryParams();//查询条件 let params = this.getQueryParams();//查询条件
params.depId = this.currentDeptId; params.depId = this.currentDeptId;
params.pageNo = arg
if(pageSize !== undefined) {
params.pageSize = pageSize
}
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
this.loading = false this.loading = false
if (res.success && res.result) { if (res.success && res.result) {
this.dataSource = res.result.records || []; this.dataSource = res.result.records || [];
this.ipagination.total = res.result.total; this.total = res.result.total;
}else{ }else{
this.dataSource = [] this.dataSource = []
} }
@@ -345,4 +373,7 @@
margin-top: -16px; margin-top: -16px;
margin-bottom: 16px; margin-bottom: 16px;
} }
/deep/.ant-table-pagination{
display: none;
}
</style> </style>
@@ -42,6 +42,9 @@
<a-form-item :label="$t('userName')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('userName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('enterUserName')" :disabled='isdisabled' v-decorator.trim="[ 'realname', validatorRules.realname]"/> <a-input :placeholder="$t('enterUserName')" :disabled='isdisabled' v-decorator.trim="[ 'realname', validatorRules.realname]"/>
</a-form-item> </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-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!--<a-input placeholder="请输入工号" v-decorator.trim="[ 'workNo', validatorRules.workNo]" />--> <!--<a-input placeholder="请输入工号" v-decorator.trim="[ 'workNo', validatorRules.workNo]" />-->
@@ -378,7 +381,7 @@
that.visible = true that.visible = true
that.model = Object.assign({}, record) that.model = Object.assign({}, record)
that.$nextTick(() => { 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') { if (this.model.userIdentity == '2') {