[update] 配置 提示 删除权限控制
This commit is contained in:
@@ -712,6 +712,8 @@ module.exports = {
|
|||||||
uploadTime: 'Upload time',
|
uploadTime: 'Upload time',
|
||||||
enclosure: 'Enclosure',
|
enclosure: 'Enclosure',
|
||||||
// 认证
|
// 认证
|
||||||
|
theCurrent: 'The current status of this data is',
|
||||||
|
thisbuttonCompleted: 'This button can only be operated when the status is completed',
|
||||||
Frozenstatus: 'Frozen status, can only be viewed',
|
Frozenstatus: 'Frozen status, can only be viewed',
|
||||||
chinese: 'chinese',
|
chinese: 'chinese',
|
||||||
integerOrDecimal: 'integer Or Decimal',
|
integerOrDecimal: 'integer Or Decimal',
|
||||||
|
|||||||
@@ -723,6 +723,8 @@ module.exports = {
|
|||||||
uploadTime: '上传时间',
|
uploadTime: '上传时间',
|
||||||
enclosure: '附件',
|
enclosure: '附件',
|
||||||
// 认证
|
// 认证
|
||||||
|
theCurrent: '此数据当前状态为',
|
||||||
|
thisbuttonCompleted: '当状态为"已完成"时,才可操作此按钮',
|
||||||
Frozenstatus: '冻结状态,仅可以查看',
|
Frozenstatus: '冻结状态,仅可以查看',
|
||||||
chinese: '中文',
|
chinese: '中文',
|
||||||
integerOrDecimal: '整数或小数',
|
integerOrDecimal: '整数或小数',
|
||||||
|
|||||||
@@ -65,6 +65,11 @@
|
|||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
|
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
|
||||||
<template slot="title" id="popconfirm">
|
<template slot="title" id="popconfirm">
|
||||||
|
<!-- 退回-->
|
||||||
|
<div @click="returnDataJurisdiction" class="operator-text-title">
|
||||||
|
<a-icon type="delete"/>
|
||||||
|
{{$t('sendBack')}}
|
||||||
|
</div>
|
||||||
<!-- 下发收集 -->
|
<!-- 下发收集 -->
|
||||||
<div @click="distributionAndCollectionJurisdiction" class="operator-text-title">
|
<div @click="distributionAndCollectionJurisdiction" class="operator-text-title">
|
||||||
<a-icon type="solution"/>
|
<a-icon type="solution"/>
|
||||||
@@ -115,16 +120,17 @@
|
|||||||
<a-icon type="check-circle"/>
|
<a-icon type="check-circle"/>
|
||||||
{{$t('submit')}}
|
{{$t('submit')}}
|
||||||
</div>
|
</div>
|
||||||
<!-- 退回-->
|
|
||||||
<div @click="returnDataJurisdiction" class="operator-text">
|
|
||||||
<a-icon type="delete"/>
|
|
||||||
{{$t('sendBack')}}
|
|
||||||
</div>
|
|
||||||
<!-- 批量删除-->
|
<!-- 批量删除-->
|
||||||
<div @click="handleDelJurisdiction" class="operator-text" v-has="'document:deleteBatch'">
|
<div @click="handleDelJurisdiction" class="operator-text">
|
||||||
<a-icon type="delete"/>
|
<a-icon type="delete"/>
|
||||||
{{$t('BatchDelete')}}
|
{{$t('BatchDelete')}}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 角色切换 -->
|
||||||
|
<div class="operator-text"
|
||||||
|
@click="roleSwitchingClick">
|
||||||
|
<a-icon type="select"/>
|
||||||
|
{{ $t('roleSwitching') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%">
|
<div style="width: 100%">
|
||||||
<!-- 表格-10控件-->
|
<!-- 表格-10控件-->
|
||||||
@@ -194,6 +200,39 @@
|
|||||||
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
|
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
|
||||||
:selectedRowKeysArray='selectedRowKeysArray' @areaVisible='areaVisibsynchronous = false'/>
|
:selectedRowKeysArray='selectedRowKeysArray' @areaVisible='areaVisibsynchronous = false'/>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<a-modal
|
||||||
|
:title="$t('roleSwitching')"
|
||||||
|
:width="500"
|
||||||
|
:visible="visibleRoleSwitching"
|
||||||
|
:confirm-loading="confirmLoadingRoleSwitching"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOkRoleSwitching"
|
||||||
|
@cancel="handleCancelRoleSwitching"
|
||||||
|
>
|
||||||
|
<a-form-model :model="formInlineRoleSwitching" class="formAdd" :rules="rulesRoleSwitching"
|
||||||
|
ref="ruleFormRoleSwitching">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text-index">
|
||||||
|
<div class="title-text-Comment">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('roleSwitching')">{{$t('roleSwitching')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModelComment itemitem" :prop="'roleSwitchingCode'">
|
||||||
|
<a-select allowClear mode="multiple" :placeholder="$t('pleaseSelect')+$t('roleSwitching')"
|
||||||
|
v-model="formInlineRoleSwitching.roleSwitchingCode">
|
||||||
|
<a-select-option v-for="(item, key) in RoleType" :key="key" :value="item.value">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.label " >
|
||||||
|
{{ item.label }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -314,6 +353,23 @@ export default {
|
|||||||
},
|
},
|
||||||
rules: {},
|
rules: {},
|
||||||
FreezeList: [], // 冻结字段
|
FreezeList: [], // 冻结字段
|
||||||
|
visibleRoleSwitching: false, // 角色切换
|
||||||
|
confirmLoadingRoleSwitching: false,
|
||||||
|
formInlineRoleSwitching: {},
|
||||||
|
rulesRoleSwitching: {
|
||||||
|
roleSwitchingCode: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('roleSwitching') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
RoleType: [ // 控件类型
|
||||||
|
{value:'homo', label: '认证工程师' },
|
||||||
|
{value:'sdt', label: '工程接口人' },
|
||||||
|
{value:'dre', label: '填写人' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -326,6 +382,15 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
handleCancelRoleSwitching() {
|
||||||
|
this.visibleRoleSwitching = false
|
||||||
|
},
|
||||||
|
handleOkRoleSwitching() {
|
||||||
|
//
|
||||||
|
},
|
||||||
|
roleSwitchingClick() {
|
||||||
|
this.visibleRoleSwitching = true
|
||||||
|
},
|
||||||
GetgetLoginUserType() {
|
GetgetLoginUserType() {
|
||||||
console.log('ooo')
|
console.log('ooo')
|
||||||
this.$refs.CollectionTabel.getLoginUserType()
|
this.$refs.CollectionTabel.getLoginUserType()
|
||||||
@@ -1191,11 +1256,33 @@ export default {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
|
.box-title-text-index {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.title-text-Comment {
|
||||||
|
width: 74px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
.box-input .ant-select-selection {
|
.box-input .ant-select-selection {
|
||||||
height: 38px !important;
|
height: 38px !important;
|
||||||
}
|
}
|
||||||
|
.itemitem{
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
.box-input .ant-select-selection__rendered {
|
.box-input .ant-select-selection__rendered {
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
|
.Required{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -192,7 +192,8 @@
|
|||||||
historicalRow: {}, // 历史版本得数据
|
historicalRow: {}, // 历史版本得数据
|
||||||
drawerVisible: false,
|
drawerVisible: false,
|
||||||
drawerVisibleitem: false,
|
drawerVisibleitem: false,
|
||||||
titleTag: ''
|
titleTag: '',
|
||||||
|
selectedRowKeysvalArray: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -208,20 +209,24 @@
|
|||||||
window.open(newUrl.href, '_blank')
|
window.open(newUrl.href, '_blank')
|
||||||
},
|
},
|
||||||
deleteLib(val) {
|
deleteLib(val) {
|
||||||
let _this = this
|
if(val.state === '已完成') {
|
||||||
this.$confirm({
|
let _this = this
|
||||||
content: _this.$t('ConfirmDelete'),
|
this.$confirm({
|
||||||
onOk() {
|
content: _this.$t('ConfirmDelete'),
|
||||||
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
|
onOk() {
|
||||||
if (res.success) {
|
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
|
||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
if (res.success) {
|
||||||
_this.getlist()
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
} else {
|
_this.getlist()
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
} else {
|
||||||
}
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('thisbuttonCompleted'))
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleTableChange() {
|
handleTableChange() {
|
||||||
|
|
||||||
@@ -253,9 +258,10 @@
|
|||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getlist()
|
this.getlist()
|
||||||
},
|
},
|
||||||
onSelectChange(val) {
|
onSelectChange(val,valArray) {
|
||||||
this.selectedRowKeys = val
|
this.selectedRowKeys = val
|
||||||
this.selectedRowKeysArray = val.join(',')
|
this.selectedRowKeysArray = val.join(',')
|
||||||
|
this.selectedRowKeysvalArray = valArray
|
||||||
},
|
},
|
||||||
edit(edit) {
|
edit(edit) {
|
||||||
this.areaVisible = true
|
this.areaVisible = true
|
||||||
@@ -271,9 +277,9 @@
|
|||||||
let _this = this
|
let _this = this
|
||||||
if(this.selectedRowKeys.length == 0){
|
if(this.selectedRowKeys.length == 0){
|
||||||
this.$message.warning(_this.$t('pleaseSelectData'))
|
this.$message.warning(_this.$t('pleaseSelectData'))
|
||||||
}else if(this.selectedRowKeys.length > 2){
|
}else if(this.selectedRowKeys.length > 1){
|
||||||
this.$message.warning(_this.$t('OnlyOneSelected'))
|
this.$message.warning(_this.$t('OnlyOneSelected'))
|
||||||
} else {
|
} else if(this.selectedRowKeysvalArray[0].state === '已完成'){
|
||||||
axios({
|
axios({
|
||||||
url: `/jero-boot/params/manifest/changeExtension?id=${this.selectedRowKeys[0]}`,
|
url: `/jero-boot/params/manifest/changeExtension?id=${this.selectedRowKeys[0]}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@@ -299,48 +305,61 @@
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(_this.$t('thisbuttonCompleted'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleDel() {
|
handleDel() {
|
||||||
let param = {
|
// 默认为0 可全部删除
|
||||||
ids: this.selectedRowKeysArray
|
let flag = 1
|
||||||
}
|
this.selectedRowKeysvalArray.forEach((item) => {
|
||||||
if (this.selectedRowKeys.length > 0) {
|
if(item.state !== '已完成'){
|
||||||
let _this = this
|
flag = 0
|
||||||
this.$confirm({
|
}
|
||||||
content: _this.$t('ConfirmBatchDeletion'),
|
})
|
||||||
onOk() {
|
if(flag) {
|
||||||
axios({
|
let param = {
|
||||||
url: `/jero-boot/params/manifest/deleteBatch`,
|
ids: this.selectedRowKeysArray
|
||||||
method: 'post',
|
}
|
||||||
data: param,
|
if (this.selectedRowKeys.length > 0) {
|
||||||
transformRequest: [function(data) {
|
let _this = this
|
||||||
let ret = ''
|
this.$confirm({
|
||||||
for (let it in data) {
|
content: _this.$t('ConfirmBatchDeletion'),
|
||||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
onOk() {
|
||||||
}
|
axios({
|
||||||
return ret
|
url: `/jero-boot/params/manifest/deleteBatch`,
|
||||||
}],
|
method: 'post',
|
||||||
headers: {
|
data: param,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
transformRequest: [function(data) {
|
||||||
'X-Access-Token': _this.token
|
let ret = ''
|
||||||
}
|
for (let it in data) {
|
||||||
})
|
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||||
.then((res) => {
|
}
|
||||||
if (res.data.success) {
|
return ret
|
||||||
_this.$message.success(res.data.message)
|
}],
|
||||||
_this.getlist()
|
headers: {
|
||||||
} else {
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
_this.$message.warning(res.data.message)
|
'X-Access-Token': _this.token
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.then((res) => {
|
||||||
console.log(error)
|
if (res.data.success) {
|
||||||
})
|
_this.$message.success(res.data.message)
|
||||||
}
|
_this.getlist()
|
||||||
})
|
} else {
|
||||||
|
_this.$message.warning(res.data.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('thisbuttonCompleted'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCody() {
|
handleCody() {
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||||
import uploadFile from '@/components/uploadFile/file'
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
import axios from 'axios'
|
||||||
export default {
|
export default {
|
||||||
name: 'addModel',
|
name: 'addModel',
|
||||||
components: {
|
components: {
|
||||||
@@ -213,9 +214,15 @@ export default {
|
|||||||
this.$message.warning(this.$t('oneconfigurationInformation'))
|
this.$message.warning(this.$t('oneconfigurationInformation'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.deleteConfigIdsArray.push(displaySeq)
|
let _this = this
|
||||||
this.deleteConfigIds = this.deleteConfigIdsArray.join(',')
|
this.$confirm({
|
||||||
let _tt = this.paramsConfigEOList.splice(index,1)
|
content: _this.$t('ConfirmDelete'),
|
||||||
|
onOk() {
|
||||||
|
// _this.deleteConfigIdsArray.push(displaySeq)
|
||||||
|
// _this.deleteConfigIds = this.deleteConfigIdsArray.join(',')
|
||||||
|
let _tt = _this.paramsConfigEOList.splice(index,1)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|||||||
Reference in New Issue
Block a user