Merge branch 'dev_2nd_LCYH' of http://git.hzwlsoft.com/laws-nio/laws-weilai into dev_2nd_LCYH

This commit is contained in:
yuekuo
2023-03-28 17:50:58 +08:00
8 changed files with 374 additions and 9 deletions
@@ -54,6 +54,7 @@ public class OtaBaSjGnxtwhController extends JeroController<OtaBaSjGnxtwh, IOtaB
HttpServletRequest req) {
QueryWrapper<OtaBaSjGnxtwh> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjGnxtwh, req.getParameterMap());
Page<OtaBaSjGnxtwh> page = new Page<OtaBaSjGnxtwh>(pageNo, pageSize);
queryWrapper.orderByDesc("create_time");
IPage<OtaBaSjGnxtwh> pageList = otaBaSjGnxtwhService.page(page, queryWrapper);
return Result.OK(pageList);
}
+3
View File
@@ -1731,4 +1731,7 @@ module.exports = {
theDeliverablesCannotReferencedPleaseReselect:'The deliverables of this project cannot be referenced, please reselect',
regulationListModuleMaintenance:'Regulation list module maintenance',
regulationListModule:'Regulation list module',
gnxtwh:'Functional system maintenance',
gnxt:'Functional system',
dykzq:'Corresponding controller',
}
+3
View File
@@ -1833,4 +1833,7 @@ module.exports = {
theDeliverablesCannotReferencedPleaseReselect:'不能引用本项目的交付物请重新选择',
regulationListModuleMaintenance:'法规清单模块维护',
regulationListModule:'法规清单模块',
gnxtwh:'功能系统维护',
gnxt:'功能系统',
dykzq:'对应控制器',
}
@@ -0,0 +1,348 @@
<!--功能系统维护-->
<template>
<div>
<a-drawer
:title="$t('gnxtwh')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div class="table-operator" style='margin-bottom: 20px;float: right'>
<div @click="addHandleClick"
class="operator-text">
<a-icon type="plus"/>
{{$t('add')}}
</div>
</div>
<a-table
style='margin-top: 45px'
class="table"
:columns="columnshistory"
:pagination="false"
:scroll="{x: '100%', y: 'calc(100vh - 330px)'}"
:data-source="dataSourcehistory"
:loading="loading"
>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 10?text.slice(0,9)+'...':text}}
</span>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation"
@click="editClick(record)">{{$t('edit')}}</a>
<a class="text-operation"
style='margin-left: 10px'
v-has="'regulatoryAndTechnicalAssessment:delete'"
@click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSizehistory"
:total="total"
:current="pageNohistory"
@change="onChangehistory"
@showSizeChange="SizeChangehistory"
/>
</div>
<div class="drawer-bootom-button" >
<a-button @click="handleOk" style="margin-right: 16px" type="primary">{{$t('determine')}}</a-button>
<a-button @click="handleCancel" >{{$t('cancel')}}</a-button>
</div>
</a-drawer>
<a-modal
:title="$t('newlyAdded')"
:width="600"
:visible="visibleadd"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleaddOk"
@cancel="handleaddCancel"
>
<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('gnxt')">
{{$t('gnxt')}}</span>
</div>
<a-form-model-item class="itemModel" prop="bazt">
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('gnxt')"
v-model="formInline.gnxt"></a-input>
</a-form-model-item>
</div>
</a-col>
<div v-for="(item,index) in formInline.dataList" :key="index">
<div class="header-text">
{{$t('dykzq')}}
<a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/>
<a-icon class="icon-text" v-if="formInline.dataList.length > 1" @click="deleteClick(index)"
type="minus-circle" :disabled="disabled"/>
</div>
<div style='margin-left: 25px'>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('dykzq') + (index+1)">{{$t('dykzq') + (index+1)}}</span>
</div>
<a-form-model-item class="itemModel">
<a-input class="box-input"
:disabled="disabled"
v-model="item.dykzq"
:placeholder="$t('PleaseEnter')+$t('dykzq')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</div>
</div>
</a-row>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import { getAction, postAction ,deleteAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import { mapGetters } from 'vuex'
export default {
name:"addModel",
components:{
uploadFile
},
data() {
return {
loading: false,
dataSourcehistory:[],
columnshistory: [
{
title: this.$t('gnxt'),
dataIndex: 'gnxt',
align: 'left',
ellipsis: true,
scopedSlots: { customRender: 'gnxt' },
width: 180
},
{
title: this.$t('dykzq'),
dataIndex: 'dykzq',
align: 'left',
ellipsis: true,
width: 100,
scopedSlots: { customRender: 'detailText' }
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 220,
scopedSlots: { customRender: 'operation' }
}
],
rules:[],
pageSizehistory: 10,
total: 0,
pageNohistory: 1,
visible: false,
visibleadd: false,
disabled: false,
showButton:false,
formInline: {},
confirmLoading: false,
acceptcode:'',
projectNameList: [],
DeliverableTreeList: [],
url:{
addModel:''
},
record:{}
}
},
mounted() {
this.bussLogList()
},
methods: {
...mapGetters(['userInfo']),
add(){
this.visible = true
this.bussLogList()
},
addHandleClick(){
this.visibleadd = true
this.formInline.dataList = [{}]
},
editClick(){
},
addClick(index){
this.formInline.dataList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline }
},
deleteClick(index) {
this.formInline.dataList.splice(index, 1)
this.formInline = { ...this.formInline }
},
handleOk() {
this.pageNohistory = 1
this.visible = false
},
handleCancel() {
this.visible = false
},
handleaddOk() {
let dykzqList = []
this.formInline.dataList.forEach((item) => {
dykzqList.push(item.dykzq)
})
this.formInline.dykzq = dykzqList.join(',')
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
...this.formInline
}
this.confirmLoading = true
postAction('ota/otaBaSjGnxtwh/add', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visibleadd = false
this.confirmLoading = false
this.bussLogList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
},
handleaddCancel() {
this.visibleadd = false
},
onChangehistory(page, pageSize) {
this.pageNohistory = page
this.bussLogList()
},
SizeChangehistory(page, pageSize) {
this.pageNohistory = 1
this.pageSizehistory = pageSize
this.bussLogList()
},
bussLogList(val) {
let query = {
pageNo: this.pageNohistory,
pageSize: this.pageSizehistory,
otaId:localStorage.getItem('otaId')
}
this.loading = true
getAction('ota/otaBaSjGnxtwh/page', query).then((res) => {
if (res.success) {
this.dataSourcehistory = res.result.records
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
// 删除
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction('ota/otaBaSjGnxtwh/delete', { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.bussLogList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 250px;
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% - 130px);
display: inline-block;
margin-top: 2px;
min-height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.header-text {
font-size: 16px;
font-weight: 500;
}
.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;
}
.icon-text {
font-size: 16px;
margin-right: 4px;
}
.page {
text-align: right;
margin-top: 20px;
}
</style>
@@ -114,10 +114,7 @@
<div class="title-text">
<span class="title-text-text"></span>
</div>
<!-- :prop="'list.'+index+'.inspectionItem'"-->
<!-- :rules="[{ required: true, message: $t('inspectionItems') + $t('cannotEmpty'), trigger: 'blur'},-->
<!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"-->
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" style='margin-left:192px'>
<a-button type="primary" class="button-text"
:disabled="disabled"
@click="clickButtonToUpload('wwcfj')">
@@ -125,7 +122,7 @@
formInline.wwcfj == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
<p style='width: 243px'>{{$t('format')}}</p>
<p style='width: 263px'>{{$t('format')}}</p>
</a-form-model-item>
</div>
</a-col>
@@ -119,6 +119,12 @@
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
<div @click="gnxtwhClick"
v-has="'regulatoryAndTechnicalAssessment:batchDelete'"
class="operator-text">
<a-icon type="solution"/>
{{$t('gnxtwh')}}
</div>
</div>
<div>
<a-table
@@ -167,6 +173,7 @@
</div>
</div>
<maintenance @getList="getList" ref="maintenanceRef"/>
<gnxtwh @getList="getList" ref="gnxtwheRef"/>
<upgradecompletion ref="upgradecompletionRef" @addModelList="addModelList"/>
</a-card>
</template>
@@ -174,6 +181,7 @@
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import maintenance from './components/maintenance'
import gnxtwh from './components/gnxtwh'
import upgradecompletion from './components/upgradecompletion'
import { mapGetters } from 'vuex'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
@@ -183,6 +191,7 @@ export default {
name: 'index',
components: {
maintenance,
gnxtwh,
upgradecompletion,
ImportFile
},
@@ -470,6 +479,10 @@ export default {
this.$refs.maintenanceRef.edit(this.selectedRowKeys)
}
},
//功能系统维护
gnxtwhClick(){
this.$refs.gnxtwheRef.add()
},
// 模板下载
handleModule(){
downloadFile('params/paramsInfo/exportTemplate', this.$t('parameterTemplateExportName') + '.xlsx', {})
@@ -51,9 +51,9 @@
otaId:localStorage.getItem('otaId')
}
this.loading = true
getAction('ota/otaBaSjLsjl/list', query).then((res) => {
getAction('ota/otaBaSjLsjl/page', query).then((res) => {
if (res.success) {
this.dataSource = res.result || []
this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
@@ -51,9 +51,9 @@
otaId:localStorage.getItem('otaId')
}
this.loading = true
getAction('ota/otaBaCxLsjl/list', query).then((res) => {
getAction('ota/otaBaCxLsjl/page', query).then((res) => {
if (res.success) {
this.dataSource = res.result || []
this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false