[add] 参数项收集清单

This commit is contained in:
zhaomeijing
2022-05-10 11:32:47 +08:00
parent 5da8cb2e43
commit ba0f28da59
3 changed files with 433 additions and 191 deletions
@@ -60,46 +60,25 @@
</a-row>
</div>
<div class="table-operator">
<div @click="handleAdd" class="operator-text">
<a-icon type="plus"/>
{{$t('add')}}{{ $t('detailedList') }}
</div>
<div @click="handleModule" class="operator-text">
<a-icon type="bulb"/>
{{$t('changeExtension')}}
</div>
<div @click="handleCody" class="operator-text">
<a-icon type="copy"/>
{{$t('copy')}}{{$t('parameter')}}{{ $t('detailedList') }}
</div>
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
<!-- <div @click="handleAdd" class="operator-text">-->
<!-- <a-icon type="plus"/>-->
<!-- {{$t('add')}}{{ $t('detailedList') }}-->
<!-- </div>-->
<!-- <div @click="handleModule" class="operator-text">-->
<!-- <a-icon type="bulb"/>-->
<!-- {{$t('changeExtension')}}-->
<!-- </div>-->
<!-- <div @click="handleCody" class="operator-text">-->
<!-- <a-icon type="copy"/>-->
<!-- {{$t('copy')}}{{$t('parameter')}}{{ $t('detailedList') }}-->
<!-- </div>-->
<!-- <div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">-->
<!-- <a-icon type="delete"/>-->
<!-- {{$t('BatchDelete')}}-->
<!-- </div>-->
</div>
<div style="width: 100%">
<a-table
class='table-area'
ref='table'
size='middle'
rowKey='id'
:columns='columns'
:dataSource='dataSource'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
<span slot="paramsManifestClick" slot-scope="text,record">
<a @click="paramsManifestClick(record)">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)">{{$t('configure')}}</a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
<a class="text-operation" @click="historicalVersion(record)">{{$t('historicalVersion')}}</a>
</span>
</a-table>
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest'/>
</div>
<div class="page">
<a-pagination
@@ -113,27 +92,19 @@
/>
</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>-->
</a-modal>
<!-- <configure ref="configureRef" :url='url' :itemId='itemId'/>-->
</a-card>
</template>
<script>
// import ImportFile from '@/components/ImportFile/index'
// import ParameterTemplate from '../dialog/ParameterTemplate'
import TableCollection from '@/components/tableCollection/index'
import { getAction,postAction } from '../../../api/manage'
// import Configure from '../dialog/configure'
import axios from 'axios'
export default {
name: 'ParameterItemCollectionList',
// components:{
// ImportFile,
// ParameterTemplate,
// Configure
// },
components:{
TableCollection
},
data(){
return{
columns:[
@@ -184,8 +155,8 @@ export default {
selectedRowKeys: [],
queryParam: {},
url: {
getHeader: 'params/collectManifest/getHeader',
list: 'params/collectManifest/list',
tableHeader: 'params/collectManifest/getHeader',
tableList: 'params/collectManifest/list',
// add: 'params/manifest/add',
// edit: 'params/manifest/edit',
// queryById: 'params/manifest/queryById',
@@ -219,158 +190,161 @@ export default {
mounted() {
},
methods:{
paramsManifestClick(item) {
// let newUrl = this.$router.resolve({
// path: '/ParameterItemCollection',
// query: item
// })
// window.open(newUrl.href, '_blank')
},
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
// getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
// if (res.success) {
// _this.$message.success(_this.$t('OperationSuccessful'))
// _this.getlist()
// } else {
// _this.$message.warning(_this.$t('operationFailed'))
// }
// })
}
})
},
handleTableChange() {
},
// paramsManifestClick(item) {
// // let newUrl = this.$router.resolve({
// // path: '/ParameterItemCollection',
// // query: item
// // })
// // window.open(newUrl.href, '_blank')
// },
// deleteLib(val) {
// let _this = this
// this.$confirm({
// content: _this.$t('ConfirmDelete'),
// onOk() {
// // getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
// // if (res.success) {
// // _this.$message.success(_this.$t('OperationSuccessful'))
// // _this.getlist()
// // } else {
// // _this.$message.warning(_this.$t('operationFailed'))
// // }
// // })
// }
// })
// },
// handleTableChange() {
//
historicalVersion() {
},
// 配置
configure(item) {
this.itemId = item.id
this.$refs.configureRef.addModel(item.id)
},
handleCancel(val) {
this.areaVisible = val
this.getlist()
},
// },
// //
// historicalVersion() {
//
// },
// // 配置
// configure(item) {
// this.itemId = item.id
// this.$refs.configureRef.addModel(item.id)
// },
// handleCancel(val) {
// this.areaVisible = val
// // this.getlist()
// },
searchQuery() {
this.pageNo = 1
this.getlist()
// this.getlist()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getlist()
},
onSelectChange(val) {
this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',')
},
edit(edit){
this.areaVisible = true
let _this = this
let query = {
paramsManifestId: this.paramsManifest.id
}
getAction(_this.url.getHeader, query).then((res) => {
if (res.success) {
console.log(res,'res..')
this.templatetitle = res.result.title
this.selectedRowKeys = res.result.paramsTemplateId.split(',')
this.rowId = res.result.id
this.version = res.result.paramsTemplatePublishVersion
console.log(this.selectedRowKeys,'this.selectedRowKeys')
console.log(typeof this.version)
} else {
}
})
},
handleAdd(){
this.areaVisible = true
},
handleModule(){
},
handleDel(){
let param={
ids: this.selectedRowKeysArray
}
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
postAction(_this.url.deleteAll, param).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleCody() {
},
getPersonnelList(){
// this.pageNo = 1
// this.getlist()
},
// onSelectChange(val) {
// this.selectedRowKeys = val
// this.selectedRowKeysArray = val.join(',')
// },
// edit(edit){
// this.areaVisible = true
// let _this = this
// let query = {
// paramsManifestId: this.paramsManifest.id
// }
// getAction(_this.url.getHeader, query).then((res) => {
// if (res.success) {
// console.log(res,'res..')
// this.templatetitle = res.result.title
// this.selectedRowKeys = res.result.paramsTemplateId.split(',')
// this.rowId = res.result.id
// this.version = res.result.paramsTemplatePublishVersion
// console.log(this.selectedRowKeys,'this.selectedRowKeys')
// console.log(typeof this.version)
// } else {
// }
// })
// },
// handleAdd(){
// this.areaVisible = true
// },
// handleModule(){
//
// },
// handleDel(){
// let param={
// ids: this.selectedRowKeysArray
// }
// if (this.selectedRowKeys.length > 0) {
// let _this = this
// this.$confirm({
// content: _this.$t('ConfirmBatchDeletion'),
// onOk() {
// postAction(_this.url.deleteAll, param).then((res) => {
// if (res.success) {
// _this.$message.success(_this.$t('OperationSuccessful'))
// // _this.getlist()
// } else {
// _this.$message.warning(_this.$t('operationFailed'))
// }
// })
// }
// })
// } else {
// this.$message.warning(this.$t('selectLeastOne'))
// }
// },
// handleCody() {
//
// },
// getPersonnelList(){
//
// },
pageOnChange() {
},
SizeChange() {
},
getlist() {
let query = {
paramsManifestId: this.paramsManifest.id,
flag: '7'
}
console.log(this.paramsManifest,'this.paramsManifestthis.paramsManifestthis.paramsManifest')
getAction(this.url.getHeader, query).then((res) => {
if(res.success) {
console.log(res,'头部,,,')
// this.total = res.result.total
// this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
}
})
// let query = {
// pageSize: this.pageSize,
// pageNo: this.pageNo,
// ...this.queryParam
// }
// console.log(this.paramsManifest,'this.paramsManifestthis.paramsManifest')
// // console.log(this.$route.query,'this.query')
getAction(this.url.list, {}).then((res) => {
if(res.success) {
console.log(res,'oooo')
// this.total = res.result.total
// this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
}
})
}
// // getlist() {
// // let query = {
// // paramsManifestId: this.paramsManifest.id,
// // }
// // let flag = {
// // flag: '7'
// // }
// // let getquery = {...query,...flag}
// // console.log(this.paramsManifest,'this.paramsManifestthis.paramsManifestthis.paramsManifest')
// // getAction(this.url.getHeader, getquery).then((res) => {
// // if(res.success) {
// // console.log(res,'头部,,,')
// // // this.total = res.result.total
// // // this.dataSource = res.result.records || []
// // this.loading = false
// // } else {
// // this.loading = false
// // }
// // })
// // // let query = {
// // // pageSize: this.pageSize,
// // // pageNo: this.pageNo,
// // // ...this.queryParam
// // // }
// // // console.log(this.paramsManifest,'this.paramsManifestthis.paramsManifest')
// // // // console.log(this.$route.query,'this.query')
// // getAction(this.url.list, query).then((res) => {
// // if(res.success) {
// // console.log(res,'oooo')
// // // this.total = res.result.total
// // // this.dataSource = res.result.records || []
// // this.loading = false
// // } else {
// // this.loading = false
// // }
// // })
// // }
},
watch: {
paramsManifest(newVal, oldVal) {
this.getlist()
}
}
// watch: {
// paramsManifest(newVal, oldVal) {
// this.getlist()
// }
// }
}
</script>