添加创建者权限
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</a-upload>
|
||||
<div class="loading-box" v-if="spinning">
|
||||
<div class="loading-content">
|
||||
<a-icon class="loading" type="loading" />
|
||||
<a-icon class="loading" type="loading"/>
|
||||
<div class="loading-tips">
|
||||
{{this.$t('Importing')}}...
|
||||
</div>
|
||||
@@ -127,6 +127,23 @@
|
||||
}
|
||||
this.spinning = false
|
||||
} else {
|
||||
let data = info.file.response
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
if (token && data.message.includes('Token失效')) {
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
okText: '重新登录',
|
||||
mask: false,
|
||||
onOk: () => {
|
||||
store.dispatch('Logout').then(() => {
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
let { message } = info.file.response
|
||||
let { name } = info.file
|
||||
let content = []
|
||||
@@ -185,7 +202,7 @@
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.loading-box{
|
||||
.loading-box {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -195,20 +212,24 @@
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 8px;
|
||||
user-select: none;
|
||||
.loading-content{
|
||||
|
||||
.loading-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
color: #21c9cc;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
.loading{
|
||||
font-size:28px ;
|
||||
|
||||
.loading {
|
||||
font-size: 28px;
|
||||
}
|
||||
.spin-loading{
|
||||
|
||||
.spin-loading {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
.loading-tips{
|
||||
|
||||
.loading-tips {
|
||||
margin-top: 5px;
|
||||
font-size: 16px;
|
||||
color: #21c9cc;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="box-title-text" v-if="isInput">
|
||||
<a-input class="box-input" :value="value"
|
||||
<a-input :class="{'box-input':!isClass}" :value="value"
|
||||
readonly
|
||||
@click.native="standardClick"
|
||||
:placeholder="$t('PleaseSelect')+query.db_field_txt"/>
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput'],
|
||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass'],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
@@ -133,18 +133,18 @@
|
||||
},
|
||||
handleSubmit() {
|
||||
// if (this.userIds && this.userIds.length > 0) {
|
||||
if (this.isSingleChoice) {
|
||||
if (this.userIds.length > 1) {
|
||||
this.$message.warning(this.$t('onlyOnePersonCanBeSelected'))
|
||||
return
|
||||
}
|
||||
if (this.isSingleChoice) {
|
||||
if (this.userIds.length > 1) {
|
||||
this.$message.warning(this.$t('onlyOnePersonCanBeSelected'))
|
||||
return
|
||||
}
|
||||
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
||||
let userName = JSON.parse(JSON.stringify(this.userName))
|
||||
this.$emit('input', userName.join(','))
|
||||
this.$emit('change', this.query.db_field_name, userIds.join(','))
|
||||
this.visible = false
|
||||
this.treeVisible = false
|
||||
}
|
||||
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
||||
let userName = JSON.parse(JSON.stringify(this.userName))
|
||||
this.$emit('input', userName.join(','))
|
||||
this.$emit('change', this.query.db_field_name, userIds.join(','),this.query.subscript)
|
||||
this.visible = false
|
||||
this.treeVisible = false
|
||||
// } else {
|
||||
// this.$message.warning(this.$t('pleaseSelectPersonFirst'))
|
||||
// }
|
||||
|
||||
@@ -114,6 +114,14 @@
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
/>
|
||||
<PersonnelSelection
|
||||
v-else-if="item.type == 'Personnel'"
|
||||
:query="{db_field_name:'valueId',db_field_txt:'',subscript:index}"
|
||||
:isInput="true"
|
||||
:isClass="true"
|
||||
:personneQuery="item"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="item.valueName"/>
|
||||
<!-- 下拉多选 -->
|
||||
<template v-else-if="item.type==='list_multi'">
|
||||
<j-multi-select-tag v-if="item.options" v-model="item.val" :options="item.options" :placeholder="$t('pleaseSelect')"/>
|
||||
@@ -239,11 +247,11 @@
|
||||
import JSelectMultiUser from '@/components/jerobiz/JSelectMultiUser'
|
||||
import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
|
||||
import JAreaLinkage from '@comp/jero/JAreaLinkage'
|
||||
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
export default {
|
||||
name: 'index',
|
||||
mixins: [mixinDevice],
|
||||
components: { JAreaLinkage, JMultiSelectTag, JDate, JSelectDepart, JSelectMultiUser },
|
||||
components: { JAreaLinkage, JMultiSelectTag, JDate, JSelectDepart, JSelectMultiUser ,PersonnelSelection},
|
||||
props: {
|
||||
/*
|
||||
fieldList: [{
|
||||
@@ -426,6 +434,7 @@
|
||||
this.queryParamsModel.splice(index, 1)
|
||||
},
|
||||
handleSelected(node, item) {
|
||||
console.log(node)
|
||||
let { type, options, dictCode, dictTable, dictText, customReturnField, popup } = node.dataRef
|
||||
item['type'] = type
|
||||
item['options'] = options
|
||||
@@ -438,6 +447,8 @@
|
||||
item['popup'] = popup
|
||||
}
|
||||
this.$set(item, 'val', undefined)
|
||||
this.$set(item, 'valueName', undefined)
|
||||
this.$set(item, 'valueId', undefined)
|
||||
},
|
||||
handleOpen() {
|
||||
this.show()
|
||||
@@ -602,7 +613,12 @@
|
||||
handleChangeJPopup(item, e, values) {
|
||||
item.val = values[item.popup['destFields']]
|
||||
},
|
||||
|
||||
PersonnelSelectionChange(value, id,index){
|
||||
console.log(index)
|
||||
this.queryParamsModel[index].val = id
|
||||
this.queryParamsModel[index].valueId = id
|
||||
console.log(this.queryParamsModel)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -682,7 +682,7 @@
|
||||
}
|
||||
],
|
||||
visibleFile: false,
|
||||
JLoading:false,
|
||||
JLoading: false,
|
||||
formInlineComment: {},
|
||||
rulesComment: {
|
||||
commentContent: [
|
||||
@@ -797,6 +797,24 @@
|
||||
value: 'region',
|
||||
text: this.$t('zoneOfApplication'),
|
||||
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
{
|
||||
type: 'Personnel',
|
||||
value: 'regulationOwnerId',
|
||||
valueName:'regulationOwnerIdName',
|
||||
text: this.$t('regulatoryEngineer')
|
||||
},
|
||||
{
|
||||
type: 'Personnel',
|
||||
value: 'homologationEngineerId',
|
||||
valueName:'homologationEngineerIdName',
|
||||
text: this.$t('certifiedEngineer')
|
||||
},
|
||||
{
|
||||
type: 'Personnel',
|
||||
value: 'engineeringInterfacePerson',
|
||||
valueName:'engineeringInterfacePersonName',
|
||||
text: this.$t('engineeringInterfacePerson')
|
||||
}
|
||||
],
|
||||
visibleRoleSwitching: false,
|
||||
@@ -866,7 +884,7 @@
|
||||
this.isDisplay = false
|
||||
}
|
||||
this.JLoading = false
|
||||
}else{
|
||||
} else {
|
||||
this.JLoading = false
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user