添加项目库
This commit is contained in:
@@ -0,0 +1,355 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('entryName')">
|
||||
<span>{{$t('entryName')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
|
||||
v-model="queryParam.entryName"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('targetMarket')">
|
||||
<span>{{$t('targetMarket')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.targetMarket"
|
||||
:placeholder="$t('PleaseSelect')+$t('targetMarket')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="''"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('projectStatus')">
|
||||
<span>{{$t('projectStatus')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.projectStatus"
|
||||
:placeholder="$t('PleaseSelect')+$t('projectStatus')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="''"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('StudioEngineer')">
|
||||
<span>{{$t('StudioEngineer')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('StudioEngineer')"
|
||||
v-model="queryParam.StudioEngineer"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
<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 @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="handleAdd" class="operator-text" v-has="'document:getInfoById'">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</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="entryName" slot-scope="text,record">
|
||||
<a @click="entryNameClick(record)">{{text}}</a>
|
||||
</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>
|
||||
<addModel ref="addModelRef"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import addModel from '../components/addModel'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
addModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
toggleSearchStatus: false,
|
||||
selectedRowKeys: [],
|
||||
formInline: {},
|
||||
rules: {},
|
||||
visible: false,
|
||||
dataSource: [],
|
||||
confirmLoading: false,
|
||||
url: {},
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
title: '新增',
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('entryName'),
|
||||
align: 'center',
|
||||
dataIndex: 'entryName',
|
||||
scopedSlots: { customRender: 'entryName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('targetMarket'),
|
||||
align: 'center',
|
||||
dataIndex: 'targetMarket'
|
||||
},
|
||||
{
|
||||
title: this.$t('projectStatus'),
|
||||
align: 'center',
|
||||
dataIndex: 'projectStatus'
|
||||
},
|
||||
{
|
||||
title: this.$t('StudioEngineer'),
|
||||
align: 'center',
|
||||
dataIndex: 'StudioEngineer'
|
||||
},
|
||||
{
|
||||
title: this.$t('certifiedEngineer'),
|
||||
align: 'center',
|
||||
dataIndex: 'certifiedEngineer'
|
||||
},
|
||||
{
|
||||
title: this.$t('CertificationTime'),
|
||||
align: 'center',
|
||||
dataIndex: 'CertificationTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('NTplatform'),
|
||||
align: 'center',
|
||||
dataIndex: 'NTplatform'
|
||||
},
|
||||
{
|
||||
title: this.$t('NPplatform'),
|
||||
align: 'center',
|
||||
dataIndex: 'NPplatform'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 200,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
queryParam: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
//添加
|
||||
handleAdd() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
//批量删除
|
||||
handleDel() {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/virtualListDetails',
|
||||
query: {}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
//编辑
|
||||
edit(item) {
|
||||
this.title = '编辑'
|
||||
this.formInline = item
|
||||
this.visible = true
|
||||
},
|
||||
//撤回
|
||||
withdraw() {
|
||||
|
||||
},
|
||||
//维护清单
|
||||
maintenanceList() {
|
||||
|
||||
},
|
||||
//订阅
|
||||
subscribe() {
|
||||
|
||||
},
|
||||
//删除
|
||||
deleteLib(item) {
|
||||
|
||||
},
|
||||
//虚拟清单名称事件
|
||||
entryNameClick(item) {
|
||||
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.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;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.box-title-text-add {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text-add {
|
||||
width: 114px;
|
||||
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;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.box-input-add {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.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;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user