[add] 参数项收集清单

This commit is contained in:
zhaomeijing
2022-05-10 16:18:42 +08:00
parent e7db88894f
commit 38bc42f703
5 changed files with 119 additions and 108 deletions
@@ -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: {