合并分支 'feature_dev_20221010_extend' 到 'dev_2nd_period_test'

Feature dev 20221010 extend

查看合并请求 laws-nio/laws-weilai!210
This commit is contained in:
高嵩
2022-10-27 09:38:05 +08:00
32 changed files with 2231 additions and 448 deletions
+8
View File
@@ -793,6 +793,7 @@ module.exports = {
parameter: 'Parameter',
changeExtension: 'Change Extension',
addDetailList: 'Add',
editDetailList:'Edit DetailList',
detailedList: 'DetailedList',
copyParamDetailList: 'Copy Parameter List',
collectionCompletionTime: 'Collection Completed',
@@ -1329,4 +1330,11 @@ 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',
softwareVersion:'Authentication Software version',
versionStatistics:'Version statistics',
addSubproject:'Add Subproject',
Topping:'Topping',
cancelTopping:'Cancel Topping',
relatedProjectVersion:'Related project version',
}
+8
View File
@@ -809,6 +809,7 @@ module.exports = {
parameter: '参数',
changeExtension: '变更扩展',
addDetailList: '添加清单',
editDetailList:'编辑清单',
detailedList: '清单',
copyParamDetailList: '复制参数清单',
collectionCompletionTime: '收集完成时间',
@@ -1430,4 +1431,11 @@ module.exports = {
thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单',
secondaryDirectory:'二级目录',
OnlyPersonsCanBeSelected:'超出最大上限最多只能选择100个人员',
projectVersion:'项目版本',
softwareVersion:'认证软件版本',
versionStatistics:'版本统计',
addSubproject:'添加子项目',
Topping:'置顶',
cancelTopping:'取消置顶',
relatedProjectVersion:'相关项目版本',
}
@@ -225,6 +225,7 @@
<a-input class="box-input add-input"
:disabled="disabled"
type="textarea"
@input="onInput"
v-model.trim="formInline.controlValues"
:placeholder="$t('PleaseEnter')+$t('NcontrolAlternatives')"/>
</a-form-model-item>
@@ -600,9 +601,12 @@ export default {
};
})
},
onInput(r) {
let value = r.target.value
r.target.value = value.replace(/[!#]/g, '')
this.formInline.controlValues = r.target.value
this.formInline = {...this.formInline}
},
getSysCategoryTree() {
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
@@ -57,6 +57,12 @@
<a-icon type="profile"/>
{{$t('TaskParameterCollection')}}
</div>
<div class="Virtual-detail-left-text"
:title="$t('projectStatus')"
@click="textClick(5,$t('projectStatus'))">
<a-icon type="cluster" />
{{$t('projectStatus')}}
</div>
<a-icon @click="textIconClick" type="menu-fold" class="text-icon"/>
</div>
<div v-if="!isDisplay" class="Virtual-detail-left-One">
@@ -85,17 +91,24 @@
@click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="profile"/>
</div>
<div class="Virtual-detail-left-text"
:title="$t('projectStatus')"
@click="textClick(5,$t('projectStatus'))">
<a-icon type="cluster" />
</div>
<a-icon @click="textIconClick" type="menu-unfold" class="text-icon-one"/>
</div>
<div class="Virtual-detail-right"
:style="{'width':isDisplay?'calc(100% - 240px)':'calc(100% - 66px)'}">
<ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/>
<ProjectDetailsName v-if="textTitle === $t('projectDetails')"/>
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"
:areaOfResponsibilityList="areaOfResponsibilityList"/>
:areaOfResponsibilityList="areaOfResponsibilityList"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
v-else-if="textTitle === $t('taskList')"/>
<TaskParameterCollection v-else-if="textTitle === $t('TaskParameterCollection')"/>
<nonConformance v-else-if="textTitle === $t('nonConformance')"/>
<projectStatus @TaskListChange="TaskListChange"
v-else-if="textTitle === $t('projectStatus')"/>
</div>
</div>
</div>
@@ -112,6 +125,7 @@
import ProjectDetailsName from '../components/ProjectDetails'
import TaskParameterCollection from '../components/TaskParameterCollection'
import nonConformance from '../components/nonConformance'
import projectStatus from '../components/projectStatus'
import updateLog from '@/components/UpdateLog/index'
import historicalVersionList from '../components/historicalVersionList'
import commentList from '../components/commentList'
@@ -128,7 +142,8 @@
nonConformance,
updateLog,
historicalVersionList,
commentList
commentList,
projectStatus
},
data() {
return {
@@ -138,7 +153,7 @@
isTrue: true,
loading: false,
isDisplay: true,
areaOfResponsibilityList:{},
areaOfResponsibilityList: {},
url: {
logList: '/project/projectLawsInventoryLogEO/page',
historicalVersionUrl: '',
@@ -150,7 +165,7 @@
},
created() {
document.title = this.$route.query.projectName ? this.$t('projectDetails') + '-' + this.$route.query.projectName : this.$t('projectDetails')
this.title = this.$route.query.projectName && this.$route.query.targetMarket ? this.$route.query.projectName + '-' + this.$route.query.targetMarket : this.$t('projectDetails')
this.title = this.$route.query.projectName
},
mounted() {
this.getTaskId()
@@ -194,7 +209,6 @@
textColor[0].classList.remove('Virtual-detail-left-text-color')
}
let text = document.getElementsByClassName('Virtual-detail-left-text')
console.log(text)
if (name == 0) {
text[name].classList.add('Virtual-detail-left-text-color')
this.textTitle = text[name].title
@@ -289,10 +303,10 @@
})
},
TaskListChange(item) {
if (item.isListing && item.isListing == '1'){
if (item.isListing && item.isListing == '1') {
this.areaOfResponsibilityList = item
this.textTitle = this.$t('listOfRegulations')
}else{
} else {
this.areaOfResponsibility = item
this.textTitle = this.$t('taskList')
}
@@ -47,6 +47,12 @@
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
data() {
return {
queryParam:{
@@ -99,7 +105,13 @@
})
},
getoptions(){
getAction('project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestLabel', {id:this.$route.query.id}).then((res) => {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction('project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestLabel', {id:id}).then((res) => {
if (res.success) {
this.options = res.result
this.queryParam.ctype = this.options[0].value
@@ -23,13 +23,18 @@
<span class="text-field-right" :title="queryForm.targetMarket_dictText"
>{{queryForm.targetMarket_dictText}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('projectVersion')">{{$t('projectVersion')}}</span>
<span class="text-field-right" :title="queryForm.projectVersion"
>{{queryForm.projectVersion}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>
<span class="text-field-right" :title="queryForm.projectStatus_dictText"
>{{queryForm.projectStatus_dictText}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('DigitalPlatform')">{{$t('DigitalPlatform')}}</span>
<span class="text-field-right" :title="queryForm.digitalPlatform"
@@ -43,17 +48,10 @@
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>
<span class="text-field-right" :title="queryForm.studioEngineerName"
>{{queryForm.studioEngineerName}}</span>
<span class="text-field-left" :title="$t('softwareVersion')">{{$t('softwareVersion')}}</span>
<span class="text-field-right" :title="queryForm.softwareVersion"
>{{queryForm.softwareVersion}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
<span class="text-field-right" :title="queryForm.certificationEngineerName"
>{{queryForm.certificationEngineerName}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('IPDInformation')">{{$t('IPDInformation')}}</span>
<span class="text-field-right text-field-right-color"
@@ -61,6 +59,8 @@
@click="urlClick(queryForm.ipdInfo)"
>{{queryForm.ipdInfo}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>
<span class="text-field-right text-field-right-color"
@@ -77,16 +77,38 @@
</div>
</div>
<div class="content-text">
<div class="text-field" style="width: 50%">
<span class="text-field-left" :title="$t('ListOfRelevantPersonnel')">{{$t('ListOfRelevantPersonnel')}}</span>
<div class="text-field-content">
<span class="text-field-left" :title="$t('explain')">{{$t('explain')}}</span>
<span class="text-field-right" :title="queryForm.explanation"
>{{queryForm.explanation}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>
<span class="text-field-right" :title="queryForm.studioEngineerName"
>{{queryForm.studioEngineerName}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
<span class="text-field-right" :title="queryForm.certificationEngineerName"
>{{queryForm.certificationEngineerName}}</span>
</div>
<div class="text-field">
<span class="text-field-left" style="float: left;margin-top: 3px" :title="$t('ListOfRelevantPersonnel')">{{$t('ListOfRelevantPersonnel')}}</span>
<span class="text-field-right"
>
<a-button type="primary" v-has="'projectRelatedPersonnel:page'" class="button-text"
<a-button type="primary" v-has="'projectRelatedPersonnel:page'"
:title="$t('ListOfRelevantPersonnel')"
class="button-text"
@click="ListOfRelevantPersonnelClick">
{{$t('ListOfRelevantPersonnel')}}
</a-button>
</span>
</div>
</div>
<div class="content-text">
</div>
<div class="box-text">
<div class="header-text">
@@ -114,21 +136,21 @@
</div>
<div class="process-content-right-xian"></div>
</div>
<a-tabs style="margin-top: 20px" v-model="activeKey" class="ant-tabs">
<a-tab-pane :key="$t('CurrentStatusOfTheProject')" :tab="$t('CurrentStatusOfTheProject')">
<currentStatusOfTheProjectEcharts @currentStatus="currentStatus"
v-if="activeKey == $t('CurrentStatusOfTheProject')"/>
</a-tab-pane>
<a-tab-pane :key="$t('DeliverableStatus')" :tab="$t('DeliverableStatus')">
<deliverableStatusEchart @currentStatus="currentStatus" v-if="activeKey == $t('DeliverableStatus')"/>
</a-tab-pane>
<a-tab-pane :key="$t('CertificationProgress')" :tab="$t('CertificationProgress')">
<certificationProgressEchart @currentStatus="currentStatus" v-if="activeKey == $t('CertificationProgress')"/>
</a-tab-pane>
<a-tab-pane :key="$t('Parametercollection')" :tab="$t('Parametercollection')">
<ParameterCollectionEchart @currentStatus="currentStatus" v-if="activeKey == $t('Parametercollection')"/>
</a-tab-pane>
</a-tabs>
<!-- <a-tabs style="margin-top: 20px" v-model="activeKey" class="ant-tabs">-->
<!-- <a-tab-pane :key="$t('CurrentStatusOfTheProject')" :tab="$t('CurrentStatusOfTheProject')">-->
<!-- <currentStatusOfTheProjectEcharts @currentStatus="currentStatus"-->
<!-- v-if="activeKey == $t('CurrentStatusOfTheProject')"/>-->
<!-- </a-tab-pane>-->
<!-- <a-tab-pane :key="$t('DeliverableStatus')" :tab="$t('DeliverableStatus')">-->
<!-- <deliverableStatusEchart @currentStatus="currentStatus" v-if="activeKey == $t('DeliverableStatus')"/>-->
<!-- </a-tab-pane>-->
<!-- <a-tab-pane :key="$t('CertificationProgress')" :tab="$t('CertificationProgress')">-->
<!-- <certificationProgressEchart @currentStatus="currentStatus" v-if="activeKey == $t('CertificationProgress')"/>-->
<!-- </a-tab-pane>-->
<!-- <a-tab-pane :key="$t('Parametercollection')" :tab="$t('Parametercollection')">-->
<!-- <ParameterCollectionEchart @currentStatus="currentStatus" v-if="activeKey == $t('Parametercollection')"/>-->
<!-- </a-tab-pane>-->
<!-- </a-tabs>-->
<listOfRelevantPersonnel ref="listOfRelevantPersonnelRef"/>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<settingList :url="url" ref="settingListRef" @settingListForm="settingListForm"/>
@@ -189,9 +211,9 @@
}
})
},
currentStatus(item) {
this.$emit('TaskListChange', item)
},
// currentStatus(item) {
// this.$emit('TaskListChange', item)
// },
getSetting() {
getAction(this.url.queryByProjectId, { projectId: this.$route.query.id }).then((res) => {
if (res.success) {
@@ -273,6 +295,35 @@
font-weight: 400;
}
}
.text-field-content {
width: 100%;
margin-bottom: 8px;
.text-field-left {
width: 124px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
float: left;
margin-right: 24px;
margin-top: 3px;
}
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 16px;
float: left;
word-break: break-word;
color: #040B29;
font-weight: 400;
}
}
}
.process-content {
@@ -354,4 +405,8 @@
height: 80px;
line-height: 80px;
}
.button-text {
padding: 0 13px;
}
</style>
@@ -84,11 +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.id'></parameter-template-add>
</a-modal>
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
</parameter-template-add>
</a-drawer>
<!-- 配置-->
<configure ref="configureRef" :url='url' :itemId='itemId' :itemRow='itemRow'/>
<!-- 历史版本-->
@@ -96,12 +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.id'></project-collection-parameters>
</a-modal>
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
</project-collection-parameters>
</a-drawer>
</a-card>
</template>
@@ -151,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',
@@ -214,6 +242,7 @@
selectedRowKeysArray: '',
templatetitle: '',
templatetitleId: '',
areaTitle:'',
rowId: '',
version: 0,
itemId: '', // 配置id
@@ -237,8 +266,8 @@
//处理接收到的消息
handler: function(res) {
let that = this
if (res.data == '1'){
this.getlist()
if (res.data == '1') {
this.getlist()
}
}
}
@@ -255,8 +284,8 @@
// localStorage.setItem('paramsManifest', JSON.stringify(item))
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item
// projectName:this.$route.query.projectName
query: item
// projectName:this.$route.query.projectName
})
window.open(newUrl.href, '_blank')
} else {
@@ -299,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
@@ -326,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
},
// 变更扩展
@@ -402,7 +433,7 @@
},
getlist() {
let query = {
projectId: this.$route.query.id,
projectId: this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id,
pageSize: this.pageSize,
pageNo: this.pageNo,
...this.queryParam
@@ -561,13 +592,14 @@
text-justify: inter-ideograph;
word-break: break-all
}
::v-deep .ant-table-row:first-child {
background: #fff!important;
background: #fff !important;
opacity: 0.95;
}
::v-deep .ant-table-body {
background: transparent!important;
background: transparent !important;
}
</style>
<style>
@@ -69,6 +69,22 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<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="12">
<div class="box-title-text">
<div class="title-text">
@@ -85,8 +101,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -104,6 +118,8 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -120,8 +136,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -135,6 +149,8 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -148,8 +164,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -165,6 +179,8 @@
<!-- ^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$
-->
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -179,8 +195,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -195,6 +209,36 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('softwareVersion')">{{$t('softwareVersion')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'softwareVersion'">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.softwareVersion"
:placeholder="$t('PleaseEnter')+$t('softwareVersion')"/>
</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="explanation">
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explanation"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -244,6 +288,13 @@
trigger: 'blur'
}
],
explanation: [
{
max: 500,
message: this.$t('explain') + this.$t('cannotExceed') + 500 + 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;%$#_]*)?/,
@@ -269,6 +320,13 @@
trigger: 'blur'
}
],
softwareVersion:[
{
max: 300,
message: this.$t('softwareVersion') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
projectNameId: [
{
required: true,
@@ -351,6 +409,7 @@
this.getNameList()
this.formInline.studioEngineerName = this.userInfo().username
this.formInline.studioEngineer = this.userInfo().id
this.formInline.projectVersion = '00'
this.formInline = { ...this.formInline }
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
@@ -33,6 +33,12 @@
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
data() {
return {
loading: false,
@@ -79,7 +85,13 @@
this.$emit('currentStatus', item)
},
getData() {
getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let certificationProgressMap = res.result.certificationProgressMap ? res.result.certificationProgressMap.certificationProgressMapList : []
@@ -40,6 +40,12 @@
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
data() {
return {
loading: false,
@@ -77,7 +83,13 @@
},
methods: {
getData() {
getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let dataSource = res.result.currentProjectStatusMap ? res.result.currentProjectStatusMap.currentProjectStatusMapList : []
@@ -36,6 +36,12 @@
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
data() {
return {
url: {
@@ -52,10 +58,15 @@
},
methods: {
getData() {
getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let listingToConfirmMap = res.result.listingToConfirmMap ? res.result.listingToConfirmMap.listingToConfirmMapList : []
let taskToConfirmMap = res.result.taskToConfirmMap ? res.result.taskToConfirmMap.taskToConfirmMapList : []
let designComplianceMap = res.result.designComplianceMap ? res.result.designComplianceMap.designComplianceMapList : []
@@ -67,7 +78,6 @@
this.dataEchartsOne(prehomoMap, 2)
this.dataEchartsOne(verifyComplianceMap, 3)
}
}
})
},
@@ -0,0 +1,84 @@
<template>
<a-card :bordered="false">
<div class="table-operator" style="margin-bottom: 10px">
<div @click="versionStatisticsClick" v-if="!this.$route.query.parentId"
class="operator-text">
<a-icon type="plus"/>
{{$t('versionStatistics')}}
</div>
</div>
<a-tabs v-model="activeKey" class="ant-tabs">
<a-tab-pane :key="$t('CurrentStatusOfTheProject')" :tab="$t('CurrentStatusOfTheProject')">
<currentStatusOfTheProjectEcharts @currentStatus="currentStatus"
:idList="idList"
v-if="activeKey == $t('CurrentStatusOfTheProject')"/>
</a-tab-pane>
<a-tab-pane :key="$t('DeliverableStatus')" :tab="$t('DeliverableStatus')">
<deliverableStatusEchart @currentStatus="currentStatus" :idList="idList"
v-if="activeKey == $t('DeliverableStatus')"/>
</a-tab-pane>
<a-tab-pane :key="$t('CertificationProgress')" :tab="$t('CertificationProgress')">
<certificationProgressEchart @currentStatus="currentStatus" :idList="idList"
v-if="activeKey == $t('CertificationProgress')"/>
</a-tab-pane>
<a-tab-pane :key="$t('Parametercollection')" :tab="$t('Parametercollection')">
<ParameterCollectionEchart @currentStatus="currentStatus" :idList="idList"
v-if="activeKey == $t('Parametercollection')"/>
</a-tab-pane>
</a-tabs>
<versionStatistics ref="versionStatisticsRef" @versionStatisticsForm="versionStatisticsForm"/>
</a-card>
</template>
<script>
import currentStatusOfTheProjectEcharts from './currentStatusOfTheProjectEcharts'
import deliverableStatusEchart from './deliverableStatusEchart'
import ParameterCollectionEchart from './ParameterCollectionEchart'
import certificationProgressEchart from './certificationProgressEchart'
import versionStatistics from './versionStatistics'
import { getAction, postAction } from '@/api/manage'
export default {
name: 'projectStatus',
components: {
ParameterCollectionEchart,
currentStatusOfTheProjectEcharts,
deliverableStatusEchart,
certificationProgressEchart,
versionStatistics
},
data() {
return {
activeKey: this.$t('CurrentStatusOfTheProject'),
selectedRowKeys: [],
idList: []
}
},
methods: {
currentStatus(item) {
this.$emit('TaskListChange', item)
},
versionStatisticsClick() {
this.$refs.versionStatisticsRef.addModel(JSON.parse(JSON.stringify(this.selectedRowKeys)))
},
versionStatisticsForm(value) {
this.idList = []
let activeKey = JSON.parse(JSON.stringify(this.activeKey))
this.activeKey = ''
if (value && value.length > 0) {
value.forEach(res => {
this.idList.push(JSON.parse(res).id)
})
}
this.selectedRowKeys = JSON.parse(JSON.stringify(value))
this.$nextTick(() => {
this.activeKey = activeKey
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,212 @@
<template>
<a-drawer
:title="$t('versionStatistics')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<!-- <div class="table-page-search-wrapper">-->
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :md="12" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('standard')">-->
<!-- <span>{{$t('standard')}}</span>-->
<!-- </div>-->
<!-- <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"-->
<!-- v-model="queryParam.serial_number"></a-input>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">-->
<!-- <a-col :md="12" :sm="24">-->
<!-- <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>-->
<!-- </span>-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<a-table
:columns="columns"
:rowKey="(record)=>JSON.stringify(record)"
:scroll="{x: '100%',y:500}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'versionStatistics',
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('VersionNumber'),
dataIndex: 'projectVersion',
align: 'center',
ellipsis: true,
width: 200
},
{
title: this.$t('describe'),
dataIndex: 'explanation',
align: 'center',
ellipsis: true,
width: 500
}
],
dataList: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
url: {
list: '/project/projectLibraryBase/versionStatistics'
}
}
},
mounted() {
},
methods: {
addModel(value) {
this.visible = true
this.queryParam = {}
this.selectedRowKeys = JSON.parse(JSON.stringify(value))
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
id:this.$route.query.id,
...this.queryParam
}
this.loading = true
postAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$emit('versionStatisticsForm', this.selectedRowKeys)
this.visible = false
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 33px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 100%;
height: 38px;
}
.box-button {
height: 38px;
}
</style>
@@ -10,19 +10,75 @@
: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'
class='box-input'
: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">
@@ -94,11 +150,11 @@
:dataSource='areaTable'
:pagination='false'
:loading='loading'
:scroll='{x: 600,y:300}'
: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
@@ -145,6 +201,7 @@
ellipsis: true
}
],
projectVersionList: [],
newVisible: false,
labelCol: {
xs: { span: 24 },
@@ -164,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: [],
@@ -195,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()
@@ -246,9 +323,15 @@
},
editData(edit) {
// 编辑一行的数据
this.row = edit
this.formData = { ...edit }
this.selectedRowKeys = edit.paramsTemplateId.split(',')
let query = JSON.parse(JSON.stringify(edit))
if (query.projectVersion) {
query.projectVersion = query.projectVersion.split(',')
}else{
query.projectVersion = []
}
this.row = query
this.formData = { ...query }
this.selectedRowKeys = query.paramsTemplateId.split(',')
},
//新增
handleSubmit() {
@@ -267,10 +350,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 = {
@@ -377,8 +467,16 @@
}
.drawer-bootom-button {
display: flex;
justify-content: flex-end;
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 {
@@ -393,7 +491,7 @@
}
.title-text {
width: 85px;
width: 84px;
text-align: right;
display: inline-block;
font-weight: 500;
@@ -413,10 +511,10 @@
}
.itemModel {
width: calc(100% - 101px);
width: calc(100% - 100px);
display: inline-block;
margin-top: 2px;
height: 40px;
/*height: 40px;*/
margin-bottom: 24px;
}
@@ -473,6 +571,15 @@
.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 {
@@ -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>
@@ -0,0 +1,278 @@
<template>
<a-drawer
:title="$t('addSubproject')"
: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="explanation">
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explanation
"
: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: {
explanation: [
{
max: 500,
message: this.$t('explain') + this.$t('cannotExceed') + 500 + 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 = {}
this.formInline.id = value.parentId || value.id
if (!value.versionLast) {
this.formInline.projectVersion = '01'
} else if (value.versionLast) {
if (value.versionLast.slice(0, 1) == '0') {
let num = value.versionLast.slice(1, 2)
let numIndex = parseInt(num) + 1
numIndex = numIndex + ''
if (numIndex.length == 1) {
this.formInline.projectVersion = '0' + numIndex
} else {
this.formInline.projectVersion = numIndex
}
} else {
let index = parseInt(value.versionLast) + 1
index = index + ''
if (index.length == 1) {
this.formInline.projectVersion = '0' + index
} else {
this.formInline.projectVersion = index
}
}
}
this.formInline = { ...this.formInline }
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
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
postAction('/project/projectLibraryBase/addChild', query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('changeExtensionForm')
} 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>
@@ -125,10 +125,18 @@
:columns="columns"
>
<span slot="projectName" slot-scope="text,record">
<a @click="entryNameClick(record)">{{text}}</a>
<a @click="entryNameClick(record)" :title="text">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
<a class="text-operation"
v-if="!record.parentId"
@click="toppingClick(record)">
{{record.flag == '1'?$t('cancelTopping'):$t('Topping')}}
</a>
<a class="text-operation" @click="changeExtensionClick(record)">
{{$t('addSubproject')}}
</a>
<a class="text-operation"
v-has="'projectLibraryBase:delete'"
v-if="record.createBy == userInfoQuery.username"
@@ -150,12 +158,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 +173,8 @@
name: 'index',
components: {
addModel,
PersonnelSelection
PersonnelSelection,
changeExtensionModel
},
data() {
return {
@@ -189,26 +200,26 @@
columns: [
{
title: this.$t('entryName'),
align: 'center',
align: 'left',
dataIndex: 'projectName',
width: 180,
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 +228,19 @@
dataIndex: 'studioEngineerName'
},
{
title: this.$t('certifiedEngineer'),
title: this.$t('explain'),
align: 'center',
width: 180,
width: 280,
ellipsis: true,
dataIndex: 'certificationEngineerName'
dataIndex: 'explanation'
},
// {
// title: this.$t('certifiedEngineer'),
// align: 'center',
// width: 180,
// ellipsis: true,
// dataIndex: 'certificationEngineerName'
// },
{
title: this.$t('ModelPlatform'),
align: 'center',
@@ -241,7 +259,7 @@
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 100,
width: 302,
scopedSlots: { customRender: 'operation' }
}
],
@@ -258,6 +276,32 @@
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
toppingClick(row) {
let flag = ''
if (row.flag == '1') {
flag = '0'
} else {
flag = '1'
}
let query = {
flag: flag,
id: row.id
}
getAction('/project/projectLibraryBase/top', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
changeExtensionClick(val) {
this.$refs.changeExtensionModelRef.editModel(JSON.parse(JSON.stringify(val)))
},
changeExtensionForm() {
this.getList()
},
onSelectChange(value) {
this.selectedRowKeys = value
},