修改禅道已知bug

This commit is contained in:
qq787203167
2022-06-30 17:30:59 +08:00
parent 7e9d744e00
commit 312c47fc90
2 changed files with 248 additions and 229 deletions
@@ -1,7 +1,7 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery" >
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24" class='add-padding'>
<a-col :md="7" :sm="8">
<div class="box-title-text">
@@ -57,6 +57,9 @@
{{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
</a>
</span>
<span slot="collectionCompletionTime" slot-scope="text,record">
{{record.finishTime ? record.finishTime : '-'}}
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)">{{$t('configure')}}</a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
@@ -77,8 +80,9 @@
/>
</div>
<!-- 参数模板-->
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel' :version='version'
<a-modal v-model="areaVisible" :maskClosable="false" :title="$t('parameterTemplate')" width='750px' :footer="null">
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel'
:version='version'
:projectId='this.$route.query.id'></parameter-template-add>
</a-modal>
<!-- 配置-->
@@ -87,11 +91,12 @@
<a-modal v-model="historicalVisible" :title="$t('historicalVersion')" width='750px' :footer="null">
<historical-version v-if='historicalVisible' :historicalRow='historicalRow'></historical-version>
</a-modal>
<!-- 复制参数模板-->
<!-- 复制参数模板-->
<a-modal class="show-drawer" :title="$t('Copyparameterlist')" width="700px" v-model="drawerVisible" :footer="null">
<project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel' :templateTitle='templatetitle' @copysubmit='copysubmit'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.id'></project-collection-parameters>
<project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel'
:templateTitle='templatetitle' @copysubmit='copysubmit'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.id'></project-collection-parameters>
</a-modal>
</a-card>
</template>
@@ -139,7 +144,8 @@
{
title: this.$t('collectionCompletionTime'),
align: 'center',
dataIndex: 'finishTime'
dataIndex: 'finishTime',
scopedSlots: { customRender: 'collectionCompletionTime' }
},
{
title: this.$t('Version'),
@@ -177,7 +183,7 @@
deleteAll: 'params/manifest/deleteBatch',
conAdd: 'params/config/addBatch',
conList: 'params/config/list',
changeExtension:'params/manifest/changeExtension',
changeExtension: 'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig'
},
loading: false,
@@ -199,7 +205,7 @@
drawerVisible: false,
drawerVisibleitem: false,
titleTag: '',
selectedRowKeysvalArray: [],
selectedRowKeysvalArray: []
}
},
mounted() {
@@ -214,7 +220,7 @@
localStorage.setItem('paramsManifest', JSON.stringify(item))
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item,
query: item
})
window.open(newUrl.href, '_blank')
} else {
@@ -223,7 +229,7 @@
})
},
deleteLib(val) {
if(val.state === '已完成' || val.state === 'Finished' ) {
if (val.state === '已完成' || val.state === 'Finished') {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
@@ -252,9 +258,9 @@
},
// 配置
configure(item) {
this.itemId = item.id
this.itemRow = item
this.$refs.configureRef.addModel(item.id)
this.itemId = item.id
this.itemRow = item
this.$refs.configureRef.addModel(item.id)
},
handleCancel(val) {
this.areaVisible = val
@@ -277,7 +283,7 @@
this.pageNo = 1
this.getlist()
},
onSelectChange(val,valArray) {
onSelectChange(val, valArray) {
this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',')
this.selectedRowKeysvalArray = valArray
@@ -286,7 +292,7 @@
this.areaVisible = true
setTimeout(() => {
this.$refs.templateRef.editData(edit)
},50)
}, 50)
},
handleAdd() {
this.areaVisible = true
@@ -294,11 +300,11 @@
// 变更扩展
handleModule() {
let _this = this
if(this.selectedRowKeys.length == 0){
if (this.selectedRowKeys.length == 0) {
this.$message.warning(_this.$t('pleaseSelectData'))
}else if(this.selectedRowKeys.length > 1){
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(_this.$t('OnlyOneSelected'))
} else if(this.selectedRowKeysvalArray[0].state === '已完成'|| this.selectedRowKeysvalArray[0].state ==='Finished'){
} else if (this.selectedRowKeysvalArray[0].state === '已完成' || this.selectedRowKeysvalArray[0].state === 'Finished') {
getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
@@ -316,11 +322,11 @@
// 默认为0 可全部删除
let flag = 1
this.selectedRowKeysvalArray.forEach((item) => {
if(item.state !== '已完成' && val.state !== 'Finished' ){
flag = 0
if (item.state !== '已完成' && val.state !== 'Finished') {
flag = 0
}
})
if(flag) {
if (flag) {
let param = {
ids: this.selectedRowKeysArray
}
@@ -501,8 +507,9 @@
cursor: pointer;
border-radius: 4px;
}
/deep/.add-padding{
margin-left: -89px!important;
/deep/ .add-padding {
margin-left: -89px !important;
}
</style>
<style>
@@ -11,16 +11,16 @@
>
<a-row :gutter='24'>
<a-col :span='9'>
<a-form-model-item :label="$t('title')" prop='title'>
<a-form-model-item class="itemAddAdmin" :label="$t('title')" prop='title'>
<a-input style='width: 420px'
:placeholder="$t('PleaseEnter')+$t('title')"
v-model='formData.title' />
v-model='formData.title'/>
</a-form-model-item>
</a-col>
<a-col :span='9'>
</a-col>
<a-col :span='6'>
</a-col>
<!-- <a-col :span='9'>-->
<!-- </a-col>-->
<!-- <a-col :span='6'>-->
<!-- </a-col>-->
</a-row>
<a-row :gutter='24'>
<a-col :span='9'>
@@ -29,7 +29,7 @@
<j-dict-select-tag class='box-input' v-model='form.region'
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'"
:triggerChange='false' :dictCode="'region'" />
:triggerChange='false' :dictCode="'region'"/>
</a-form-model-item>
</a-form-model-item>
</a-col>
@@ -37,7 +37,7 @@
<a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>
<a-input
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
v-model='form.paramsTemplateName' />
v-model='form.paramsTemplateName'/>
</a-form-model-item>
</a-col>
<a-col :span='6' style='margin-top: 5px'>
@@ -79,148 +79,153 @@
</template>
<script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
export default {
name: 'diolagArea',
components: {},
data() {
return {
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('zoneOfApplication'),
dataIndex: 'region_dictText',
key: 'showArea',
align: 'center',
ellipsis: true
export default {
name: 'diolagArea',
components: {},
data() {
return {
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('zoneOfApplication'),
dataIndex: 'region_dictText',
key: 'showArea',
align: 'center',
ellipsis: true
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
formData: {},
rules: {
title: [
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
row: {}
}
},
props: {
version: {
type: Number,
default: '',
required: false
},
projectId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
}
},
mounted() {
this.loadData()
},
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
formData: {},
rules: {
title: [
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' },
{
max: 200,
message: this.$t('title') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
row: {}
}
getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
searchQuery() {
props: {
version: {
type: Number,
default: '',
required: false
},
projectId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
}
},
mounted() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
console.log(',,,')
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
editData(edit) {
// 编辑一行的数据
this.row = edit
this.formData = {...edit}
this.selectedRowKeys = edit.paramsTemplateId.split(',')
},
//新增
handleSubmit() {
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
if(this.formData.title !== undefined) {
this.formData.title = this.formData.title.trim()
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
searchQuery() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
console.log(',,,')
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
editData(edit) {
// 编辑一行的数据
this.row = edit
this.formData = { ...edit }
this.selectedRowKeys = edit.paramsTemplateId.split(',')
},
//新增
handleSubmit() {
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
if (this.formData.title !== undefined) {
this.formData.title = this.formData.title.trim()
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
let postDate = {
title: this.formData.title,
paramsTemplateId: this.paramsTemplateId || this.selectedRowKeys[0],
@@ -230,7 +235,7 @@ export default {
if (this.formData.id) {
//编辑
postDate = {
id : this.formData.id,
id: this.formData.id,
...postDate
}
postAction(`params/manifest/edit`, postDate).then(res => {
@@ -271,85 +276,92 @@ export default {
this.spinLoading = false
this.confirmLoading = false
}
})
}
},
cancelModel() {
this.newVisible = false
this.$refs.ruleForm.resetFields()
},
//删除按钮
deleteArea(val) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: '',
onOk:
async () => {
getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.areaTable.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1
}
this.loadData()
} else {
// this.$message.warning(res.message)
if (res.message == '该展示区域有关联数据,无法删除!') {
this.$message.warning(this.$t('noDelete'))
} else {
this.$message.warning(this.$t('operationFailed'))
}
}
})
}
})
}
// 编辑
},
cancelModel() {
this.newVisible = false
this.$refs.ruleForm.resetFields()
},
//删除按钮
deleteArea(val) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: '',
onOk:
async () => {
getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.areaTable.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1
}
this.loadData()
} else {
// this.$message.warning(res.message)
if (res.message == '该展示区域有关联数据,无法删除!') {
this.$message.warning(this.$t('noDelete'))
} else {
this.$message.warning(this.$t('operationFailed'))
}
}
})
}
})
},
// 编辑
},
watch: {
selectedRowKeyS(val) {
this.selectedRowKeys = val
watch: {
selectedRowKeyS(val) {
this.selectedRowKeys = val
}
}
}
}
}
</script>
<style lang='less' scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
.diolag-area {
.table-area {
margin: 20px 0;
.diolag-area {
.table-area {
margin: 20px 0;
.action-edit {
margin-right: 10px;
.action-edit {
margin-right: 10px;
}
}
.table-del {
color: red;
}
}
.table-del {
.drawer-bootom-button {
display: flex;
justify-content: center;
}
.Required {
color: red;
margin-right: 4px;
}
}
.drawer-bootom-button{
display: flex;
justify-content: center;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
<style lang='less'>
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
}
}
}
}
}
}
</style>
<style>
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
white-space: nowrap!important;
}
</style>