Merge remote-tracking branch 'origin/master'

This commit is contained in:
zer0Black
2022-06-11 13:31:12 +08:00
5 changed files with 181 additions and 64 deletions
+2
View File
@@ -712,6 +712,8 @@ module.exports = {
uploadTime: 'Upload time',
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',
chinese: 'chinese',
integerOrDecimal: 'integer Or Decimal',
+2
View File
@@ -723,6 +723,8 @@ module.exports = {
uploadTime: '上传时间',
enclosure: '附件',
// 认证
theCurrent: '此数据当前状态为',
thisbuttonCompleted: '当状态为"已完成"才可操作此按钮',
Frozenstatus: '冻结状态,仅可以查看',
chinese: '中文',
integerOrDecimal: '整数或小数',
@@ -65,6 +65,11 @@
<div class="table-operator">
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
<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">
<a-icon type="solution"/>
@@ -115,16 +120,17 @@
<a-icon type="check-circle"/>
{{$t('submit')}}
</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"/>
{{$t('BatchDelete')}}
</div>
<!-- 角色切换 -->
<div class="operator-text"
@click="roleSwitchingClick">
<a-icon type="select"/>
{{ $t('roleSwitching') }}
</div>
</div>
<div style="width: 100%">
<!-- 表格-10控件-->
@@ -194,6 +200,39 @@
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
:selectedRowKeysArray='selectedRowKeysArray' @areaVisible='areaVisibsynchronous = false'/>
</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>
</template>
@@ -314,6 +353,23 @@ export default {
},
rules: {},
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: {
@@ -326,6 +382,15 @@ export default {
mounted() {
},
methods:{
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
handleOkRoleSwitching() {
//
},
roleSwitchingClick() {
this.visibleRoleSwitching = true
},
GetgetLoginUserType() {
console.log('ooo')
this.$refs.CollectionTabel.getLoginUserType()
@@ -1191,11 +1256,33 @@ export default {
}
</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 {
height: 38px !important;
}
.itemitem{
width: 250px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
.Required{
color: red;
}
</style>
@@ -192,7 +192,8 @@
historicalRow: {}, // 历史版本得数据
drawerVisible: false,
drawerVisibleitem: false,
titleTag: ''
titleTag: '',
selectedRowKeysvalArray: [],
}
},
mounted() {
@@ -208,20 +209,24 @@
window.open(newUrl.href, '_blank')
},
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
if(val.state === '已完成') {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('thisbuttonCompleted'))
}
},
handleTableChange() {
@@ -253,9 +258,10 @@
this.pageNo = 1
this.getlist()
},
onSelectChange(val) {
onSelectChange(val,valArray) {
this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',')
this.selectedRowKeysvalArray = valArray
},
edit(edit) {
this.areaVisible = true
@@ -271,9 +277,9 @@
let _this = this
if(this.selectedRowKeys.length == 0){
this.$message.warning(_this.$t('pleaseSelectData'))
}else if(this.selectedRowKeys.length > 2){
}else if(this.selectedRowKeys.length > 1){
this.$message.warning(_this.$t('OnlyOneSelected'))
} else {
} else if(this.selectedRowKeysvalArray[0].state === '已完成'){
axios({
url: `/jero-boot/params/manifest/changeExtension?id=${this.selectedRowKeys[0]}`,
method: 'get',
@@ -299,48 +305,61 @@
.catch((error) => {
console.log(error)
})
} else {
this.$message.warning(_this.$t('thisbuttonCompleted'))
}
},
handleDel() {
let param = {
ids: this.selectedRowKeysArray
}
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
axios({
url: `/jero-boot/params/manifest/deleteBatch`,
method: 'post',
data: param,
transformRequest: [function(data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': _this.token
}
})
.then((res) => {
if (res.data.success) {
_this.$message.success(res.data.message)
_this.getlist()
} else {
_this.$message.warning(res.data.message)
// 默认为0 可全部删除
let flag = 1
this.selectedRowKeysvalArray.forEach((item) => {
if(item.state !== '已完成'){
flag = 0
}
})
if(flag) {
let param = {
ids: this.selectedRowKeysArray
}
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
axios({
url: `/jero-boot/params/manifest/deleteBatch`,
method: 'post',
data: param,
transformRequest: [function(data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': _this.token
}
})
.catch((error) => {
console.log(error)
})
}
})
.then((res) => {
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 {
this.$message.warning(this.$t('selectLeastOne'))
this.$message.warning(this.$t('thisbuttonCompleted'))
}
},
handleCody() {
@@ -114,6 +114,7 @@
<script>
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import axios from 'axios'
export default {
name: 'addModel',
components: {
@@ -213,9 +214,15 @@ export default {
this.$message.warning(this.$t('oneconfigurationInformation'))
return
}
this.deleteConfigIdsArray.push(displaySeq)
this.deleteConfigIds = this.deleteConfigIdsArray.join(',')
let _tt = this.paramsConfigEOList.splice(index,1)
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
// _this.deleteConfigIdsArray.push(displaySeq)
// _this.deleteConfigIds = this.deleteConfigIdsArray.join(',')
let _tt = _this.paramsConfigEOList.splice(index,1)
}
})
},
handleCancel() {
this.visible = false