[add] 参数项收集清单
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<div style="height: 100%">
|
||||
<div class='box'>
|
||||
<!-- 纯文本-->
|
||||
<div v-if='detailDate.controlType === "1"'>
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.nioNumber"
|
||||
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
|
||||
</div>
|
||||
<!-- 纯下拉单选-->
|
||||
<div v-if='detailDate.controlType === "2"'>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('controlType')" v-model="formInline.controlType">
|
||||
<a-select-option v-for="(item, key) in detailDate.list" :key="key" :value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.nioNumber"
|
||||
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
|
||||
</div>
|
||||
<!-- 纯下拉多选-->
|
||||
<div v-if='detailDate.controlType === "3"'>22</div>
|
||||
<!-- 纯附件-->
|
||||
<div v-if='detailDate.controlType === "4"'>22</div>
|
||||
<!-- 文本+下拉单选-->
|
||||
<div v-if='detailDate.controlType === "5"'>22</div>
|
||||
<!-- 文本+下拉多选-->
|
||||
<div v-if='detailDate.controlType === "6"'>22</div>
|
||||
<!-- 文本+附件-->
|
||||
<div v-if='detailDate.controlType === "7"'>22</div>
|
||||
<!-- 下拉单选+附件-->
|
||||
<div v-if='detailDate.controlType === "8"'>22</div>
|
||||
<!-- 下拉多选+附件-->
|
||||
<div v-if='detailDate.controlType === "9"'>22</div>
|
||||
<!-- 文本+下拉单选+附件-->
|
||||
<div v-if='detailDate.controlType === "10"'>22</div>
|
||||
</div>
|
||||
<!-- {{ detailDate.controlType }}-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
props: {
|
||||
detailDate: {
|
||||
type: Object,
|
||||
default: {},
|
||||
require: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
formInline: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.table .ant-table-column-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ant-table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box {
|
||||
width: 100%;
|
||||
height: calc(100% - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -27,41 +27,17 @@
|
||||
</a>
|
||||
</span>
|
||||
<span slot="detailClick" slot-scope="text,record">
|
||||
<a class="text" :title="text" @click="detailClick(record)">
|
||||
{{text && text.length > 18?text.slice(0,17)+'...':text}}
|
||||
</a>
|
||||
<collection-type :detailDate='record' />
|
||||
</span>
|
||||
<span slot="urlClick" slot-scope="text,record">
|
||||
<a class="text" :title="text" @click="urlClick(text)">
|
||||
{{text && text.length > 18?text.slice(0,17)+'...':text}}
|
||||
</a>
|
||||
</span>
|
||||
<span slot="detailText" slot-scope="text,record">
|
||||
<span class="text" :title="text">
|
||||
{{text && text.length > 18?text.slice(0,17)+'...':text}}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="page" v-if="dataSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import eventBUs from '../../common/event'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
import CollectionType from '@/components/CollectionType'
|
||||
export default {
|
||||
name: 'index',
|
||||
props: {
|
||||
@@ -75,16 +51,10 @@ export default {
|
||||
type: Object,
|
||||
default: {},
|
||||
require: true
|
||||
},
|
||||
// flag: {
|
||||
// type: String,
|
||||
// default: ''
|
||||
// },
|
||||
// //是否显示操作;默认不显示
|
||||
// showAction: {
|
||||
// type: Boolean,
|
||||
// default: false
|
||||
// }
|
||||
}
|
||||
},
|
||||
components: {
|
||||
CollectionType
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -104,26 +74,7 @@ export default {
|
||||
orderByField: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// eventBUs.$on('searchQuery', search => {
|
||||
// Object.keys(search).forEach(res => {
|
||||
// if (search[res] instanceof Array) {
|
||||
// search[res] = search[res].join(',')
|
||||
// }
|
||||
// })
|
||||
// this.searchParmes = search
|
||||
// this.getData()
|
||||
// this.getTableList()
|
||||
// })
|
||||
// eventBUs.$on('searchReset', target => {
|
||||
// this.searchParmes = {}
|
||||
// this.selectedRowKeys = []
|
||||
// this.getData()
|
||||
// this.getTableList()
|
||||
// })
|
||||
// this.getData()
|
||||
// this.getTableList()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
getTextWith(text, fontStyle) {
|
||||
@@ -138,13 +89,10 @@ export default {
|
||||
paramsManifestId: this.paramsManifest.id,
|
||||
flag: '7'
|
||||
}
|
||||
console.log(params,'paramsparams')
|
||||
getAction(this.url.tableHeader, params).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res,'res...头部')
|
||||
var jsonHead = res.result
|
||||
this.columns = []
|
||||
// res.db_field_txt
|
||||
jsonHead.forEach((res, index) => {
|
||||
this.columns.push({
|
||||
title: res.db_field_txt,
|
||||
@@ -153,26 +101,12 @@ export default {
|
||||
ellipsis: true,
|
||||
sorter: res.sort
|
||||
})
|
||||
// if (res.click) {
|
||||
// this.columns[index].scopedSlots = {
|
||||
// customRender: 'detailClick'
|
||||
// }
|
||||
// } else if (res.urlClick) {
|
||||
// this.columns[index].scopedSlots = {
|
||||
// customRender: 'urlClick'
|
||||
// }
|
||||
// } else {
|
||||
// this.columns[index].scopedSlots = {
|
||||
// customRender: 'detailText'
|
||||
// }
|
||||
// }
|
||||
if (res.type) {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'detailClick'
|
||||
}
|
||||
}
|
||||
})
|
||||
// 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'),
|
||||
@@ -192,18 +126,11 @@ export default {
|
||||
let params = {
|
||||
paramsManifestId: this.paramsManifest.id,
|
||||
}
|
||||
console.log(params,'paykkkkk')
|
||||
this.loading = true
|
||||
getAction(this.url.tableList, params).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res,'res...list')
|
||||
// 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.dataSource = res.result
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
@@ -214,11 +141,6 @@ export default {
|
||||
// this.pageNo = page
|
||||
// this.getTableList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
// this.pageNo = 1
|
||||
// this.pageSize = pageSize
|
||||
// this.getTableList()
|
||||
},
|
||||
onSelectChange(value) {
|
||||
// this.selectedRowKeys = value
|
||||
// this.$emit('onSelectChange', value)
|
||||
@@ -228,9 +150,6 @@ export default {
|
||||
},
|
||||
detailClick(item, index) {
|
||||
// this.$emit('detailClick', item)
|
||||
},
|
||||
urlClick(item) {
|
||||
// window.open(item)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -80,17 +80,6 @@
|
||||
<div style="width: 100%">
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest'/>
|
||||
</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-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
|
||||
</a-modal>
|
||||
</a-card>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
|
||||
<parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
||||
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template>
|
||||
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :projectId='this.$route.query.id'></parameter-template>
|
||||
</a-modal>
|
||||
<configure ref="configureRef" :url='url' :itemId='itemId'/>
|
||||
</a-card>
|
||||
|
||||
@@ -140,6 +140,11 @@ export default {
|
||||
type: Number,
|
||||
default: '',
|
||||
required: false
|
||||
},
|
||||
projectId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -200,7 +205,8 @@ export default {
|
||||
let postDate = {
|
||||
title: this.templatetitle,
|
||||
paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||
paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version
|
||||
paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version,
|
||||
projectId: this.projectId
|
||||
}
|
||||
if (this.rowId) {
|
||||
//编辑
|
||||
|
||||
Reference in New Issue
Block a user