布局项目库变更

This commit is contained in:
sunFlower
2022-10-14 15:18:01 +08:00
parent 6160fbf200
commit cc976709a5
5 changed files with 324 additions and 19 deletions
+1
View File
@@ -1320,4 +1320,5 @@ module.exports = {
thereForTheCurrentlySelectedData:'There is no standard breakdown for the currently selected data',
secondaryDirectory:'Secondary directory',
OnlyPersonsCanBeSelected:'The maximum upper limit is exceeded; Only 100 persons can be selected',
projectVersion:'Project Version',
}
+1
View File
@@ -1421,4 +1421,5 @@ module.exports = {
thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单',
secondaryDirectory:'二级目录',
OnlyPersonsCanBeSelected:'超出最大上限最多只能选择100个人员',
projectVersion:'项目版本',
}
@@ -194,6 +194,20 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<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="explain">
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explain"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -243,6 +257,13 @@
trigger: 'blur'
}
],
explain:[
{
max: 300,
message: this.$t('explain') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
attestationPlan: [
{
pattern: /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%$#_]*)?/,
@@ -0,0 +1,263 @@
<template>
<a-drawer
:title="$t('changeExtension')"
:maskClosable="false"
:width="600"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('projectVersion')">{{$t('projectVersion')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectVersion">
<a-input class="box-input"
:disabled="true"
v-model="formInline.projectVersion"
:placeholder="$t('PleaseEnter')+$t('projectVersion')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<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="explain">
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explain"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'changeExtensionModel',
props: ['url'],
data() {
return {
formInline: {},
confirmLoading: false,
visible: false,
yearNameDataList: [],
rules: {
explain: [
{
max: 300,
message: this.$t('explain') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
projectVersion:[
{
required: true,
message: this.$t('projectVersion') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
},
disabled: false,
projectNameList: [],
title: ''
}
},
mounted() {
},
methods: {
...mapGetters(['userInfo']),
addModel(val) {
this.visible = true
this.formInline = {}
this.formInline = { ...this.formInline }
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
editModel(value) {
this.visible = true
this.formInline = value
this.formInline = { ...this.formInline }
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
let Action
if (this.formInline.id) {
url = this.url.edit
Action = putAction
} else {
url = this.url.add
Action = postAction
}
let query = JSON.parse(JSON.stringify(this.formInline))
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',')
}
})
this.confirmLoading = true
Action(url, query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.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: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 110px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.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;
}
</style>
<style>
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>
@@ -129,6 +129,9 @@
</span>
<span slot="operation" slot-scope="text,record">
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
<a class="text-operation" @click="changeExtensionClick(record)">
{{$t('changeExtension')}}
</a>
<a class="text-operation"
v-has="'projectLibraryBase:delete'"
v-if="record.createBy == userInfoQuery.username"
@@ -150,12 +153,14 @@
/>
</div>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<changeExtensionModel ref="changeExtensionModelRef" @changeExtensionForm="changeExtensionForm"/>
</a-card>
</template>
<script>
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import addModel from '../components/addModel'
import changeExtensionModel from './components/changeExtensionModel'
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { mapGetters } from 'vuex'
@@ -163,7 +168,8 @@
name: 'index',
components: {
addModel,
PersonnelSelection
PersonnelSelection,
changeExtensionModel
},
data() {
return {
@@ -195,20 +201,20 @@
ellipsis: true,
scopedSlots: { customRender: 'projectName' }
},
{
title: this.$t('targetMarket'),
width: 180,
ellipsis: true,
align: 'center',
dataIndex: 'targetMarket_dictText'
},
{
title: this.$t('projectStatus'),
align: 'center',
width: 180,
ellipsis: true,
dataIndex: 'projectStatus_dictText'
},
// {
// title: this.$t('targetMarket'),
// width: 180,
// ellipsis: true,
// align: 'center',
// dataIndex: 'targetMarket_dictText'
// },
// {
// title: this.$t('projectStatus'),
// align: 'center',
// width: 180,
// ellipsis: true,
// dataIndex: 'projectStatus_dictText'
// },
{
title: this.$t('StudioEngineer'),
align: 'center',
@@ -217,12 +223,19 @@
dataIndex: 'studioEngineerName'
},
{
title: this.$t('certifiedEngineer'),
title: this.$t('explain'),
align: 'center',
width: 180,
width: 280,
ellipsis: true,
dataIndex: 'certificationEngineerName'
dataIndex: 'explain'
},
// {
// title: this.$t('certifiedEngineer'),
// align: 'center',
// width: 180,
// ellipsis: true,
// dataIndex: 'certificationEngineerName'
// },
{
title: this.$t('ModelPlatform'),
align: 'center',
@@ -241,7 +254,7 @@
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 100,
width: 160,
scopedSlots: { customRender: 'operation' }
}
],
@@ -257,6 +270,12 @@
...mapGetters(['userInfo']),
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
changeExtensionClick(val) {
this.$refs.changeExtensionModelRef.addModel(JSON.parse(JSON.stringify(val)))
},
changeExtensionForm() {
},
onSelectChange(value) {
this.selectedRowKeys = value