This commit is contained in:
zhaomeijing
2022-06-23 18:15:16 +08:00
parent 07476d3550
commit ac030c45fe
3 changed files with 465 additions and 13 deletions
+5
View File
@@ -352,6 +352,11 @@ export const constantRouterMap = [
name: 'ParameterItemCollection',
component: () => import(/* webpackChunkName: "user" */ '@/views/projectManagement/components/ParameterItemCollectionList')
},
{
path: '/managementdetails',
name: 'managementdetails',
component: () => import(/* webpackChunkName: "user" */ '@/views/parameter/managementdetails/index')
},
{
path: '/taskListProcess',
name: 'taskListProcess',
@@ -182,20 +182,11 @@ export default {
},
//删除
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
let newUrl = this.$router.resolve({
path: '/managementdetails',
query: val
})
window.open(newUrl.href, '_blank')
},
//虚拟清单名称事件
entryNameClick(item) {
@@ -0,0 +1,456 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper doc-detail">
<div class="Virtual-detail-header" style="top: 0">
<div class="Virtual-detail-title">
<span>
{{ $t('ParameteItemCollectionList') }}
</span>
</div>
</div>
<!-- 认证参数收集-参数项收集清单-10控件-->
<div class='Virtual-detail-content' style='margin-top: 15px'>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24" style='margin-left: -90px;'>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('NiONumber')">
<span>{{$t('NiONumber')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NiONumber')"
v-model="formInline.nioNumber"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('ParameterName')">
<span>{{$t('ParameterName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterName')"
v-model="formInline.paramsName"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('certificationCategory')">
<span>{{$t('certificationCategory')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
:type="'select'"
:triggerChange="false" :dictCode="'cert_category'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('completedBy')">
<span>{{$t('completedBy')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('completedBy')"
v-model="formInline.dre"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :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>
</div>
<div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<span slot="titleName" slot-scope="text,record" :title="text">
{{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
</span>
</a-table>
</div>
<div class="page">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</a-card>
</template>
<script>
import { getAction,postAction } from '../../../api/manage'
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
export default {
name: 'ParameterItemCollectionList',
data(){
return{
columns:[],
selectedRowKeys: [],
formInline: {},
url: {
tableHeader: 'report/detail/getHeader',
tableList: 'report/detail/list',
// add: 'params/collectManifest/submit',
// getLoginUserType: 'params/collectManifest/getLoginUserType', // 获取当前登陆人
// getquerySdtList: 'params/collectManifest/querySdtList', // 获取工程接口人的列表
// updateSdt: 'params/collectManifest/updateSdt', // 提交工程接口人
// deleteBatch: 'params/collectManifest/deleteBatch',
},
loading: false,
dataSource: [],
areaVisible: false, // 弹框的控制
configureareaVisible: false, // 配置的彈框
pageNo: 1,
pageSize: 10,
total: 0,
selectedRowKeysArray: '',
templatetitle: '',
templatetitleId: '',
rowId: '',
version: 0,
itemId: '',
selectedRowKeysValue: [], // table列表所选得数据
token:Vue.ls.get(ACCESS_TOKEN),
Dateline: {},
areaVisibleFreeze: false, // 冻结配置
areaVisibleAssignedby: false, // 分配填写人弹框
areaVisibleTaskCutOffTime: false, // 截至时间弹框
areaVisiblereferenceparameter: false, // 引用参数弹框
areaVisibsynchronous: false, // 同步上报库弹框
visibleoperationFailed: false, // 数据失败的弹框
currentPersonRole: '', // 当前人角色
jurisdiction: '',
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
rules: {},
FreezeList: [], // 冻结字段
visibleRoleSwitching: false, // 角色切换
confirmLoadingRoleSwitching: false,
formInlineRoleSwitching: {},
rulesRoleSwitching: {
roleSwitchingCode: [
{
required: true,
message: this.$t('roleSwitching') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
RoleType: [ ],// 控件类型
NotSelectedRowKeysValue: [],
NoEngineer: 1, // 下发收集的权限,0为没有接口人 1为由接口人 默认有
NotSelectedNoEngineerValue: [],
paramsManifest: {}
}
},
props: {
},
mounted() {
this.Getlist()
this.getTableList()
},
methods:{
Getlist() {
getAction(this.url.tableHeader, {paramsManifestId: this.$route.query.id,flag: 8}).then((res) => {
if (res.success) {
var jsonHead = res.result
this.columns = []
// res.db_field_txt
jsonHead.forEach((res, index) => {
this.columns.push({
title: res.db_field_txt,
dataIndex: res.db_field_name,
align: 'center',
ellipsis: true,
sorter: res.sort
})
if (res.urlClick) {
this.columns[index].scopedSlots = {
customRender: 'urlClick'
}
}else if(res.db_field_name=='iterms_conditions'){
this.columns[index].width='500'
this.columns[index].scopedSlots = {
customRender: 'showContent'
}
}else{
this.columns[index].scopedSlots = {
customRender: 'detailText'
}
}
})
// console.log('this.columns',this.columns)
let width = 0
if (this.OperationList.length > 0) {
for (let i = 0; i < this.OperationList.length; i++) {
width += this.getTextWith(this.OperationList[i].text)
}
}
if (this.showAction) {
this.columns.push({
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: width,
scopedSlots: { customRender: 'operation' }
})
}
// console.log('columns',this.columns)
}
})
},
getTableList() {
// console.log('this.searchParmestable',this.searchParmes)
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
let params = {
...this.searchParmes,
pageNo: pageNo + '',
pageSize: pageSize + ''
}
// console.log('parmsss',params)
this.loading = true
getAction(this.url.tableList, {paramsManifestId: this.$route.query.id}).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getTableList()
return
}
this.dataSource = res.result.records
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange() {
},
GetgetTableList() {
this.$refs.CollectionTabel.getTableList()
},
// 表格所选中得行内容
rowValue(val) {
this.selectedRowKeysValue = val
},
// 表格所选中得id
value(val) {
this.selectedRowKeys = val,
this.selectedRowKeysArray = val.join(',')
},
listReset() {
this.formInline = {}
},
handleModule() {
},
handleCody() {
},
searchQuery() {
this.pageNo = 1
this.$refs.CollectionTabel.getTableList()
},
searchReset() {
this.$refs.CollectionTabel.getTableListReset()
},
pageOnChange() {
},
SizeChange() {
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.Virtual-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 32px 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
.Virtual-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
}
}
.Virtual-detail-content {
margin-top: 68px;
padding: 0 38px 0 38px;
box-sizing: border-box;
font-size: 16px;
.box-title-text-add {
line-height: 1.4;
}
.title-text-add {
display: inline-block;
font-weight: 500;
margin-right: 16px;
height: 42px;
line-height: 42px;
}
}
}
.header-text {
font-size: 16px;
font-weight: 400;
height: 60px;
color: #000F16;
line-height: 40px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
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: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.text-operation {
margin-right: 8px;
}
.page {
text-align: right;
margin-top: 20px;
}
.operator-text-left {
font-size: 14px;
margin-right: 20px;
background: #eff1f3;
padding: 8px 8px;
cursor: pointer;
border-radius: 4px;
}
.operator-text-title {
cursor: pointer;
margin-right: 22px;
font-size: 14px;
font-weight: 400;
color: #040B29;
margin-bottom: 22px;
}
.box-title-text-index {
line-height: 1.4;
display: flex;
}
.title-text-Comment {
width: 74px;
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: 36px;
}
.box-input .ant-select-selection {
height: 38px !important;
}
.itemitem{
width: 250px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
.Required{
color: red;
}
</style>