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: {
type: Number,
default: 120
},
filterParams: {
type: Array,
default () {
return []
}
}
},
@ -260,9 +266,21 @@ export default {
this.table.params,
(data, rspMsg) => {
if (data) {
this.tableData = data.list
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
},

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

@ -190,7 +190,14 @@ export default {
tableHeight: {
type: Number
},
pageVisible: Boolean // page lyx 20190411
pageVisible: Boolean, // page lyx 20190411
filterParams: {
type: Array,
default () {
return []
}
}
},
activated () {
// debugger
@ -244,7 +251,22 @@ export default {
(data, rspMsg) => {
if (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
},

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

@ -20,6 +20,7 @@
:url="tableUrl"
:params="tableParams"
keyword="Temp"
:filterParams="filterParams"
:operations="operations"
:orderOperations="orderOperations"
@selectRadioRow="selectRadioRow">
@ -44,6 +45,7 @@ export default {
data () {
return {
params: {},//
clientTypeShow: '',//
tempForm: {
commitUrl: 'https://epmet-cloud.elinkservice.cn/api/third/code/upload',
// commitUrl: '/third/code/upload',
@ -74,6 +76,7 @@ export default {
return {}
}
},
//
operations: [],
orderOperations: [],
@ -91,7 +94,28 @@ export default {
tableHeight () {
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: {
// optionData: {
@ -103,10 +127,11 @@ export default {
},
methods: {
// eslint-disable-next-line
initData (params, optionData) {
initData (params, optionData, clientTypeShow) {
this.diaVisible = true
this.optionData = optionData
this.params = params
this.clientTypeShow = clientTypeShow
this.$nextTick(() => {
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',
// 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