Browse Source

上传代码过滤

master
jiangyy 5 years ago
parent
commit
6a69503f4a
  1. 22
      epmet-oper-web/src/views/components/CTable.vue
  2. 24
      epmet-oper-web/src/views/components/CTableNoPage.vue
  3. 29
      epmet-oper-web/src/views/modules/customer/miniProAgent/version/CommitForm.vue
  4. 2
      epmet-oper-web/src/views/modules/customer/miniProAgent/version/VersionItem.vue

22
epmet-oper-web/src/views/components/CTable.vue

@ -200,6 +200,12 @@ export default {
operationWidth: { operationWidth: {
type: Number, type: Number,
default: 120 default: 120
},
filterParams: {
type: Array,
default () {
return []
}
} }
}, },
@ -260,9 +266,21 @@ export default {
this.table.params, this.table.params,
(data, rspMsg) => { (data, rspMsg) => {
if (data) { if (data) {
this.tableData = data.list
this.total = data.total this.total = data.total
this.tableData = data.list
if (this.filterParams.length > 0) {
this.filterParams.forEach(paramItem => {
const key = paramItem.key
const value = paramItem.value
this.tableData = this.tableData.filter(item => {
item[key].indexOf(value) > 0
})
})
}
} }
this.loading = false this.loading = false
}, },

24
epmet-oper-web/src/views/components/CTableNoPage.vue

@ -190,7 +190,14 @@ export default {
tableHeight: { tableHeight: {
type: Number type: Number
}, },
pageVisible: Boolean // page lyx 20190411 pageVisible: Boolean, // page lyx 20190411
filterParams: {
type: Array,
default () {
return []
}
}
}, },
activated () { activated () {
// debugger // debugger
@ -244,7 +251,22 @@ export default {
(data, rspMsg) => { (data, rspMsg) => {
if (data) { if (data) {
this.tableData = data this.tableData = data
console.log(this.filterParams)
if (this.filterParams.length > 0) {
this.filterParams.forEach(paramItem => {
const key = this.filterParams[0].key
const value = this.filterParams[0].value
this.tableData = this.tableData.filter(item => {
// console.log(item[key])
// console.log(item[key].indexOf(value))
return item[key].indexOf(value) != -1
})
})
}
} }
this.loading = false this.loading = false
}, },

29
epmet-oper-web/src/views/modules/customer/miniProAgent/version/CommitForm.vue

@ -20,6 +20,7 @@
:url="tableUrl" :url="tableUrl"
:params="tableParams" :params="tableParams"
keyword="Temp" keyword="Temp"
:filterParams="filterParams"
:operations="operations" :operations="operations"
:orderOperations="orderOperations" :orderOperations="orderOperations"
@selectRadioRow="selectRadioRow"> @selectRadioRow="selectRadioRow">
@ -44,6 +45,7 @@ export default {
data () { data () {
return { return {
params: {},// params: {},//
clientTypeShow: '',//
tempForm: { tempForm: {
commitUrl: 'https://epmet-cloud.elinkservice.cn/api/third/code/upload', commitUrl: 'https://epmet-cloud.elinkservice.cn/api/third/code/upload',
// commitUrl: '/third/code/upload', // commitUrl: '/third/code/upload',
@ -74,6 +76,7 @@ export default {
return {} return {}
} }
}, },
// //
operations: [], operations: [],
orderOperations: [], orderOperations: [],
@ -91,7 +94,28 @@ export default {
tableHeight () { tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 50 - 400 return this.clientHeight - 60 - 80 - 80 - 50 - 400
}, },
...mapGetters(['clientHeight']) //
filterParams () {
let value = ''
if (this.env === 'prod') {
value = '正式服'
} else if (this.env === 'prod') {
value = '体验服'
} else {
value = '开发服'
}
let params = [
{
key: 'userDesc',
value: this.clientTypeShow + '-' + value
}
]
// console.log(params)
return params
},
...mapGetters(['clientHeight', 'env'])
}, },
props: { props: {
// optionData: { // optionData: {
@ -103,10 +127,11 @@ export default {
}, },
methods: { methods: {
// eslint-disable-next-line // eslint-disable-next-line
initData (params, optionData) { initData (params, optionData, clientTypeShow) {
this.diaVisible = true this.diaVisible = true
this.optionData = optionData this.optionData = optionData
this.params = params this.params = params
this.clientTypeShow = clientTypeShow
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['ref_form_temp'].assign(params) this.$refs['ref_form_temp'].assign(params)

2
epmet-oper-web/src/views/modules/customer/miniProAgent/version/VersionItem.vue

@ -420,7 +420,7 @@ export default {
// clientType: 'resi', // clientType: 'resi',
// customerId: customerId // customerId: customerId
// } // }
this.$refs['ref_commit_form'].initData(this.params, this.optionData) this.$refs['ref_commit_form'].initData(this.params, this.optionData, this.clientTypeShow)
}) })
}, },

Loading…
Cancel
Save