修改认证参数列表

This commit is contained in:
sunFlower
2022-10-20 11:00:01 +08:00
parent a0853e245c
commit a7f6a476e3
5 changed files with 622 additions and 333 deletions
+3 -1
View File
@@ -786,6 +786,7 @@ module.exports = {
parameter: 'Parameter',
changeExtension: 'Change Extension',
addDetailList: 'Add',
editDetailList:'Edit DetailList',
detailedList: 'DetailedList',
copyParamDetailList: 'Copy Parameter List',
collectionCompletionTime: 'Collection Completed',
@@ -1321,9 +1322,10 @@ module.exports = {
secondaryDirectory:'Secondary directory',
OnlyPersonsCanBeSelected:'The maximum upper limit is exceeded; Only 100 persons can be selected',
projectVersion:'Project Version',
softwareVersion:'Software version',
softwareVersion:'Authentication Software version',
versionStatistics:'Version statistics',
addSubproject:'Add Subproject',
Topping:'Topping',
cancelTopping:'Cancel Topping',
relatedProjectVersion:'Related project version',
}
+3 -1
View File
@@ -802,6 +802,7 @@ module.exports = {
parameter: '参数',
changeExtension: '变更扩展',
addDetailList: '添加清单',
editDetailList:'编辑清单',
detailedList: '清单',
copyParamDetailList: '复制参数清单',
collectionCompletionTime: '收集完成时间',
@@ -1422,9 +1423,10 @@ module.exports = {
secondaryDirectory:'二级目录',
OnlyPersonsCanBeSelected:'超出最大上限最多只能选择100个人员',
projectVersion:'项目版本',
softwareVersion:'软件版本',
softwareVersion:'认证软件版本',
versionStatistics:'版本统计',
addSubproject:'添加子项目',
Topping:'置顶',
cancelTopping:'取消置顶',
relatedProjectVersion:'相关项目版本',
}
@@ -84,13 +84,21 @@
/>
</div>
<!-- 参数模板-->
<a-modal v-model="areaVisible" :maskClosable="false" :title="$t('parameterTemplate')" width='750px' :footer="null">
<a-drawer
:visible="areaVisible"
:maskClosable="false"
@close="handleCancel"
:title="areaTitle"
width='850px'
style="height: 100%;overflow: auto;padding-bottom: 53px;"
placement="right"
:footer="null">
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel'
:version='version'
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
</parameter-template-add>
</a-modal>
</a-drawer>
<!-- 配置-->
<configure ref="configureRef" :url='url' :itemId='itemId' :itemRow='itemRow'/>
<!-- 历史版本-->
@@ -98,14 +106,23 @@
<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">
<a-drawer
class="show-drawer"
:maskClosable="false"
:visible="drawerVisible"
style="height: 100%;overflow: auto;padding-bottom: 53px;"
placement="right"
@close="drawerhandleCancel"
:title="$t('Copyparameterlist')"
width="850px"
: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.parentId ? this.$route.query.parentId : this.$route.query.id'>
</project-collection-parameters>
</a-modal>
</a-drawer>
</a-card>
</template>
@@ -155,6 +172,13 @@
ellipsis: true,
dataIndex: 'paramsTemplateName'
},
{
title: this.$t('relatedProjectVersion'),
align: 'center',
width: 120,
ellipsis: true,
dataIndex: 'projectVersion'
},
{
title: this.$t('collectionCompletionTime'),
align: 'center',
@@ -218,6 +242,7 @@
selectedRowKeysArray: '',
templatetitle: '',
templatetitleId: '',
areaTitle:'',
rowId: '',
version: 0,
itemId: '', // 配置id
@@ -303,12 +328,12 @@
this.$refs.configureRef.addModel(item.id, item)
},
handleCancel(val) {
this.areaVisible = val
this.areaVisible = false
this.getlist()
},
// 项目收集参数
drawerhandleCancel(val) {
this.drawerVisible = val
this.drawerVisible = false
},
copysubmit() {
this.drawerVisible = false
@@ -330,11 +355,13 @@
},
edit(edit) {
this.areaVisible = true
this.areaTitle = this.$t('editDetailList')
setTimeout(() => {
this.$refs.templateRef.editData(edit)
}, 50)
},
handleAdd() {
this.areaTitle = this.$t('addDetailList')
this.areaVisible = true
},
// 变更扩展
@@ -10,21 +10,78 @@
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='9'>
<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'/>
</a-form-model-item>
<a-col :span='11'>
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
</div>
<a-form-model-item class="itemModel" :prop='title'>
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline[item.db_field_name]"-->
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
<!-- <a-input-->
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
<!-- v-model='form.paramsTemplateName'/>-->
<a-input class="box-input"
:placeholder="$t('PleaseEnter')+$t('title')"
v-model='formData.title'/>
</a-form-model-item>
</div>
<!-- <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'/>-->
<!-- </a-form-model-item>-->
</a-col>
<a-col :span='11'>
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('relatedProjectVersion')">{{$t('relatedProjectVersion')}}</span>
</div>
<a-form-model-item class="itemModel" style="height: 40px">
<a-select mode="multiple"
class="box-input"
style="width: 100%"
v-model='formData.projectVersion'
:placeholder="$t('PleaseSelect')+$t('relatedProjectVersion')">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option v-for="(item, key) in projectVersionList"
:key="key"
:label="item"
:value="item">
<span class="itemOption" :title=" item ">
{{ item }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<!-- <a-col :span='9'>-->
<!-- </a-col>-->
<!-- <a-col :span='6'>-->
<!-- </a-col>-->
</a-row>
<a-row :gutter="24" style="border-bottom: 1px #f5f5f5 solid;margin-bottom: 10px">
<a-col :span="22">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('explain')">{{$t('explain')}}</span>
</div>
<a-form-model-item class="itemModel" prop="explanation">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('explain')"
v-model.trim="formData.explanation" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter='24'>
<a-col :span='9'>
<div class="box-title-text" style="margin-left: -58px;">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>
@@ -34,9 +91,9 @@
<!-- :disabled="disabled"-->
<!-- v-model="formInline[item.db_field_name]"-->
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
<!-- <a-input-->
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
<!-- v-model='form.paramsTemplateName'/>-->
<!-- <a-input-->
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
<!-- v-model='form.paramsTemplateName'/>-->
<j-dict-select-tag class='box-input' v-model='form.region'
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
:type="'select'"
@@ -44,14 +101,14 @@
:triggerChange='false' :dictCode="'region'"/>
</a-form-model-item>
</div>
<!-- <a-form-model-item ref='region' :label="$t('zoneOfApplication')" prop='region'>-->
<!-- <a-form-model-item class='itemModel' prop='region'>-->
<!-- <j-dict-select-tag class='box-input' v-model='form.region'-->
<!-- :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"-->
<!-- :type="'select'"-->
<!-- :triggerChange='false' :dictCode="'region'"/>-->
<!-- </a-form-model-item>-->
<!-- </a-form-model-item>-->
<!-- <a-form-model-item ref='region' :label="$t('zoneOfApplication')" prop='region'>-->
<!-- <a-form-model-item class='itemModel' prop='region'>-->
<!-- <j-dict-select-tag class='box-input' v-model='form.region'-->
<!-- :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"-->
<!-- :type="'select'"-->
<!-- :triggerChange='false' :dictCode="'region'"/>-->
<!-- </a-form-model-item>-->
<!-- </a-form-model-item>-->
</a-col>
<a-col :span='9'>
<div class="box-title-text">
@@ -65,16 +122,17 @@
<!-- v-model="formInline[item.db_field_name]"-->
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
<a-input
class='box-input'
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
:title="$t('PleaseSelect')+$t('parameterTemplate')"
v-model='form.paramsTemplateName'/>
</a-form-model-item>
</div>
<!-- <a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>-->
<!-- <a-input-->
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
<!-- v-model='form.paramsTemplateName'/>-->
<!-- </a-form-model-item>-->
<!-- <a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>-->
<!-- <a-input-->
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
<!-- v-model='form.paramsTemplateName'/>-->
<!-- </a-form-model-item>-->
</a-col>
<a-col :span='6' style='margin-top: 5px'>
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
@@ -92,11 +150,11 @@
:dataSource='areaTable'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
:scroll='{x: 600,y:400}'
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
</a-table>
<div class="page" style='display: flex;justify-content: flex-end; margin-bottom: 15px'>
<div class="page" style='display: flex;justify-content: flex-end; margin-bottom: 42px'>
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
@@ -143,6 +201,7 @@
ellipsis: true
}
],
projectVersionList: [],
newVisible: false,
labelCol: {
xs: { span: 24 },
@@ -162,6 +221,13 @@
message: this.$t('title') + this.$t('cannotExceed') + 200 + this.$t('Characters'),
trigger: 'blur'
}
],
explanation: [
{
max: 500,
message: this.$t('explain') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
trigger: 'blur'
}
]
},
areaTable: [],
@@ -193,8 +259,21 @@
},
mounted() {
this.loadData()
this.getProjectVersion()
},
methods: {
getProjectVersion() {
let query = {
id: this.projectId
}
getAction('/project/projectLibraryBase/getVersionsInfo', query).then((res) => {
if (res.success) {
this.projectVersionList = res.result || []
} else {
this.projectVersionList = []
}
})
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
@@ -244,6 +323,11 @@
},
editData(edit) {
// 编辑一行的数据
if (edit.projectVersion) {
edit.projectVersion = edit.projectVersion.split(',')
}else{
edit.projectVersion = []
}
this.row = edit
this.formData = { ...edit }
this.selectedRowKeys = edit.paramsTemplateId.split(',')
@@ -265,10 +349,17 @@
this.confirmLoading = true
let postDate = {
title: this.formData.title,
projectVersion: this.formData.projectVersion,
explanation: this.formData.explanation,
paramsTemplateId: this.paramsTemplateId || this.selectedRowKeys[0],
paramsTemplatePublishVersion: this.row.version || this.selectedRowKeysDate[0].version,
projectId: this.projectId
}
Object.keys(postDate).forEach(res => {
if (postDate[res] && postDate[res] instanceof Array) {
postDate[res] = postDate[res].join(',')
}
})
if (this.formData.id) {
//编辑
postDate = {
@@ -375,14 +466,23 @@
}
.drawer-bootom-button {
display: flex;
justify-content: center;
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
z-index: 100;
background: #fff;
border-radius: 0 0 2px 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.box-title-text {
line-height: 1.4;
display: flex;
@@ -390,7 +490,7 @@
}
.title-text {
width: 114px;
width: 84px;
text-align: right;
display: inline-block;
font-weight: 500;
@@ -410,10 +510,10 @@
}
.itemModel {
width: calc(100% - 130px);
width: calc(100% - 100px);
display: inline-block;
margin-top: 2px;
height: 40px;
/*height: 40px;*/
margin-bottom: 24px;
}
@@ -466,6 +566,19 @@
line-height: 6px;
color: #fff;
}
.box-button {
height: 38px;
}
.itemOption {
display: inline-block;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
</style>
<style lang='less'>
.area-module {
@@ -481,7 +594,7 @@
}
</style>
<style>
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
white-space: nowrap!important;
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
white-space: nowrap !important;
}
</style>
@@ -10,29 +10,80 @@
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='8'>
<a-form-model-item :label="$t('title')" prop='title'>
<a-input style='width: 420px'
:placeholder="$t('PleaseEnter')+$t('title')"
v-model='formData.title' />
</a-form-model-item>
<a-col :span='11'>
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
</div>
<a-form-model-item class="itemModel" :prop='title'>
<a-input class="box-input"
:placeholder="$t('PleaseEnter')+$t('title')"
v-model='formData.title'/>
</a-form-model-item>
</div>
</a-col>
<a-col :span='9'>
<a-col :span='11'>
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('relatedProjectVersion')">{{$t('relatedProjectVersion')}}</span>
</div>
<a-form-model-item class="itemModel" style="height: 40px">
<a-select mode="multiple"
class="box-input"
style="width: 100%"
v-model='formData.projectVersion'
:placeholder="$t('PleaseSelect')+$t('relatedProjectVersion')">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option v-for="(item, key) in projectVersionList"
:key="key"
:label="item"
:value="item">
<span class="itemOption" :title=" item ">
{{ item }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span='7'>
</a-row>
<a-row :gutter="24" style="border-bottom: 1px #f5f5f5 solid;margin-bottom: 10px">
<a-col :span="22">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('explain')">{{$t('explain')}}</span>
</div>
<a-form-model-item class="itemModel" prop="explanation">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('explain')"
v-model.trim="formData.explanation" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter='24'>
<a-col :span='8'>
<a-form-model-item :label="$t('entryName')" prop='projectName'>
<a-input style='width: 420px'
:placeholder="$t('PleaseEnter')+$t('entryName')"
v-model='formData.projectName' />
</a-form-model-item>
<a-col :span='11'>
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-input class="box-input"
:placeholder="$t('PleaseEnter')+$t('entryName')"
v-model='formData.projectName'/>
</a-form-model-item>
</div>
</a-col>
<a-col :span='9'>
</a-col>
<a-col :span='7' style='margin-top: 4px;padding-left: 20px'>
<!-- <a-col :span='8'>-->
<!-- <a-form-model-item :label="$t('entryName')" prop='projectName'>-->
<!-- <a-input style='width: 420px'-->
<!-- :placeholder="$t('PleaseEnter')+$t('entryName')"-->
<!-- v-model='formData.projectName'/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span='11' style="margin-top: 5px">
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
<a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>
</a-col>
@@ -48,7 +99,7 @@
:dataSource='areaTable'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
:scroll='{x: 600,y:400}'
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
<span slot='click' slot-scope='text, record'>
@@ -60,7 +111,7 @@
</span>
</a-table>
<div class="page" style='display: flex;justify-content: flex-end;'>
<div class="page" style='display: flex;justify-content: flex-end;margin-bottom: 43px'>
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
@@ -78,311 +129,405 @@
</div>
<!-- 清单弹框 -->
<a-modal v-model="listVisible" :title="$t('parameterTemplate')" width='700px' :footer="null">
<parameter-template v-if='listVisible' @areaVisible='drawerhandleCancel' @listVisibleRow='listVisibleRow'></parameter-template>
<parameter-template v-if='listVisible' @areaVisible='drawerhandleCancel'
@listVisibleRow='listVisibleRow'></parameter-template>
</a-modal>
</div>
</template>
<script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import axios from 'axios'
import Vue from 'vue'
import ParameterTemplate from '../dialog/ParameterTemplate'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import axios from 'axios'
import Vue from 'vue'
import ParameterTemplate from '../dialog/ParameterTemplate'
import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
name: 'ProjectCollectionParameters',
components: {
ParameterTemplate
},
data() {
return {
token:Vue.ls.get(ACCESS_TOKEN),
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectName',
key: 'showArea',
align: 'center',
ellipsis: true
},
{
title: this.$t('ListTitle'),
align: 'center',
dataIndex: 'title',
ellipsis: true
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
ellipsis: true,
scopedSlots: { customRender: 'parameterTemplateSlot' }
}
],
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('PleaseEnter')+this.$t('title'), trigger: 'blur' }
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
listVisible: false,
listVisibleRowDate: {}
}
},
props: {
version: {
type: Number,
default: '',
required: false
export default {
name: 'ProjectCollectionParameters',
components: {
ParameterTemplate
},
projectId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
}
},
mounted() {
this.loadData()
},
methods: {
// 清单列表传出数据
listVisibleRow(val) {
// this.selectedRowKeys = []
let newAreaTable=JSON.parse(JSON.stringify(this.areaTable))
newAreaTable.forEach((item, index) => {
if( item.id == this.listVisibleRowDate.id ) {
let _obj = {...item}
_obj.paramsTemplateId = val[0].id
_obj.paramsTemplateName = val[0].paramsTemplateName
this.areaTable.splice(index, 1,_obj)
data() {
return {
token: Vue.ls.get(ACCESS_TOKEN),
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
projectVersionList: [],
loading: false,
editId: '',
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectName',
key: 'showArea',
align: 'center',
ellipsis: true
},
{
title: this.$t('ListTitle'),
align: 'center',
dataIndex: 'title',
ellipsis: true
},
{
title: this.$t('parameterTemplate'),
align: 'center',
dataIndex: 'paramsTemplateName',
ellipsis: true,
scopedSlots: { customRender: 'parameterTemplateSlot' }
}
})
console.log(this.areaTable,'this.areaTable')
this.listVisible = false
},
parameterTemplateSlotHandler(val) {
this.listVisibleRowDate = val
console.log(val)
this.listVisible = true
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
let _this = this
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.formData
],
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('PleaseEnter') + this.$t('title'), trigger: 'blur' }
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
listVisible: false,
listVisibleRowDate: {}
}
this.loading = true
axios({
url: `/jero-boot/params/manifest/getAllManifest`,
method: 'post',
data: params,
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
},
props: {
version: {
type: Number,
default: '',
required: false
},
projectId: {
type: String,
default: '',
require: true
},
url: {
type: Object,
default: '',
require: true
}
},
mounted() {
this.loadData()
this.getProjectVersion()
},
methods: {
getProjectVersion() {
let query = {
id: this.projectId
}
})
.then( (res) =>{
if (res.data.success) {
console.log(res.data)
this.loading = false
this.areaTable = res.data.result.records || []
this.total = res.data.result.total
}else{
this.loading = false
}
})
.catch( (error) =>{
console.log(error);
});
},
searchQuery() {
this.loadData()
},
searchReset() {
this.formData = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
},
drawerhandleCancel(val) {
this.listVisible = val
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
console.log(',,,')
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
//新增
handleSubmit() {
let _this = this
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
let _tt = {
paramsTemplateId: this.selectedRowKeysDate[0].paramsTemplateId,
projectId: this.projectId,
title: this.formData.title,
paramsTemplatePublishVersion: this.selectedRowKeysDate[0].paramsTemplatePublishVersion,
sourceManifestId: this.selectedRowKeysDate[0].id,
}
postAction('params/manifest/copy', _tt).then((res) => {
if (res.success) {
this.$emit('copysubmit')
this.$message.success(this.$t('Copysuccessful'))
this.flag = false
this.spinLoading = false
this.confirmLoading = false
} else {
this.$message.warning(this.$t('Copyfailed'))
this.flag = false
this.spinLoading = false
this.confirmLoading = false
}
})
// axios({
// url: `/jero-boot/params/manifest/copy`,
// method: 'post',
// data: _tt,
// 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.$emit('copysubmit')
// _this.$message.success(res.data.message)
// _this.flag = false
// _this.spinLoading = false
// _this.confirmLoading = false
// }else{
// _this.$message.warning(res.data.message)
// _this.flag = false
// _this.spinLoading = false
// _this.confirmLoading = false
// }
// })
// .catch( (error) =>{
// console.log(error);
// });
getAction('/project/projectLibraryBase/getVersionsInfo', query).then((res) => {
if (res.success) {
this.projectVersionList = res.result || []
} else {
return false
this.projectVersionList = []
}
})
},
// 清单列表传出数据
listVisibleRow(val) {
// this.selectedRowKeys = []
let newAreaTable = JSON.parse(JSON.stringify(this.areaTable))
newAreaTable.forEach((item, index) => {
if (item.id == this.listVisibleRowDate.id) {
let _obj = { ...item }
_obj.paramsTemplateId = val[0].id
_obj.paramsTemplateName = val[0].paramsTemplateName
this.areaTable.splice(index, 1, _obj)
}
})
console.log(this.areaTable, 'this.areaTable')
this.listVisible = false
},
parameterTemplateSlotHandler(val) {
this.listVisibleRowDate = val
console.log(val)
this.listVisible = true
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
let _this = this
if (!this.formData.projectName){
this.formData.projectName = ''
}
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
projectName:this.formData.projectName
}
this.loading = true
axios({
url: `/jero-boot/params/manifest/getAllManifest`,
method: 'post',
data: params,
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) {
console.log(res.data)
this.loading = false
this.areaTable = res.data.result.records || []
this.total = res.data.result.total
} else {
this.loading = false
}
})
.catch((error) => {
console.log(error)
})
},
searchQuery() {
this.loadData()
},
searchReset() {
this.formData.projectName = ''
this.formData = {...this.formData}
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
},
drawerhandleCancel(val) {
this.listVisible = val
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
console.log(',,,')
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
//新增
handleSubmit() {
let _this = this
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
let formData = JSON.parse(JSON.stringify(this.formData))
Object.keys(formData).forEach(res => {
if (formData[res] && formData[res] instanceof Array) {
formData[res] = formData[res].join(',')
}
})
let _tt = {
paramsTemplateId: this.selectedRowKeysDate[0].paramsTemplateId,
projectId: this.projectId,
title: formData.title,
projectVersion: formData.projectVersion,
explanation: formData.explanation,
paramsTemplatePublishVersion: this.selectedRowKeysDate[0].paramsTemplatePublishVersion,
sourceManifestId: this.selectedRowKeysDate[0].id
}
postAction('params/manifest/copy', _tt).then((res) => {
if (res.success) {
this.$emit('copysubmit')
this.$message.success(this.$t('Copysuccessful'))
this.flag = false
this.spinLoading = false
this.confirmLoading = false
} else {
this.$message.warning(this.$t('Copyfailed'))
this.flag = false
this.spinLoading = false
this.confirmLoading = false
}
})
// axios({
// url: `/jero-boot/params/manifest/copy`,
// method: 'post',
// data: _tt,
// 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.$emit('copysubmit')
// _this.$message.success(res.data.message)
// _this.flag = false
// _this.spinLoading = false
// _this.confirmLoading = false
// }else{
// _this.$message.warning(res.data.message)
// _this.flag = false
// _this.spinLoading = false
// _this.confirmLoading = false
// }
// })
// .catch( (error) =>{
// console.log(error);
// });
} else {
return false
}
})
}
}
},
},
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 {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
z-index: 100;
background: #fff;
border-radius: 0 0 2px 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.Required {
color: red;
margin-right: 4px;
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 84px;
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: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 100px);
display: inline-block;
margin-top: 2px;
/*height: 40px;*/
margin-bottom: 24px;
}
.itemModel-text {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.box-button{
height: 38px;
}
}
.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>