[add] 参数项收集清单
This commit is contained in:
@@ -60,27 +60,71 @@
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
|
||||
<template slot="title" id="popconfirm">
|
||||
<!-- 下发收集 -->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('distributionAndCollection')}}
|
||||
</div>
|
||||
<!-- 冻结配置-->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('FreezeConfiguration')}}
|
||||
</div>
|
||||
<!-- 同步上报库 -->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('SynchronousReportLibrary')}}
|
||||
</div>
|
||||
<!-- 强制撤回-->
|
||||
<div @click="handleModule" class="operator-text-title">
|
||||
<a-icon type="bulb"/>
|
||||
{{$t('CompulsoryWithdrawal')}}
|
||||
</div>
|
||||
</template>
|
||||
<div class="operator-text" style="position: relative">
|
||||
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
||||
</div>
|
||||
</a-popconfirm>
|
||||
<!-- 添加-->
|
||||
<div @click="handleAdd" class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('addTo')}}
|
||||
</div>
|
||||
<!-- 分配填写人-->
|
||||
<div @click="handleCody" class="operator-text">
|
||||
<a-icon type="copy"/>
|
||||
{{$t('Assignedby')}}
|
||||
</div>
|
||||
<!-- 提交-->
|
||||
<div @click="handleSubmit" class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('submit')}}
|
||||
</div>
|
||||
<div @click="handleModule" class="operator-text">
|
||||
<a-icon type="bulb"/>
|
||||
{{$t('changeExtension')}}
|
||||
<!-- 退回-->
|
||||
<div @click="handleAdd" class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('sendBack')}}
|
||||
</div>
|
||||
<div @click="handleCody" class="operator-text">
|
||||
<a-icon type="copy"/>
|
||||
{{$t('copy')}}{{$t('parameter')}}{{ $t('detailedList') }}
|
||||
<!-- 引用参数-->
|
||||
<div @click="handleAdd" class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('referenceparameter')}}
|
||||
</div>
|
||||
<!-- 批量删除-->
|
||||
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<!-- 表格-->
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue' @value='value'/>
|
||||
</div>
|
||||
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
|
||||
<!-- 添加 -->
|
||||
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
|
||||
<parameter-library v-if='areaVisible' @addselectedRowKeys='addselectedRowKeys'/>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
@@ -88,11 +132,12 @@
|
||||
<script>
|
||||
import TableCollection from '@/components/tableCollection/index'
|
||||
import { getAction,postAction } from '../../../api/manage'
|
||||
|
||||
import ParameterLibrary from '@/components/ParameterLibrary/index'
|
||||
export default {
|
||||
name: 'ParameterItemCollectionList',
|
||||
components:{
|
||||
TableCollection
|
||||
TableCollection,
|
||||
ParameterLibrary
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
@@ -149,7 +194,7 @@ export default {
|
||||
add: 'params/collectManifest/submit',
|
||||
// edit: 'params/manifest/edit',
|
||||
// queryById: 'params/manifest/queryById',
|
||||
// deleteBatch: 'params/manifest/delete',
|
||||
deleteBatch: 'params/collectManifest/deleteBatch',
|
||||
// deleteAll: 'params/manifest/deleteBatch',
|
||||
// conAdd: 'params/config/addBatch',
|
||||
// conList: 'params/config/list',
|
||||
@@ -167,7 +212,6 @@ export default {
|
||||
rowId: '',
|
||||
version: 0,
|
||||
itemId: '',
|
||||
selectedRowKeys: [],
|
||||
selectedRowKeysValue: []
|
||||
}
|
||||
},
|
||||
@@ -181,13 +225,24 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods:{
|
||||
addselectedRowKeys() {
|
||||
console.log('llll')
|
||||
},
|
||||
// 表格所选中得行内容
|
||||
rowValue(val) {
|
||||
this.selectedRowKeysValue = val
|
||||
},
|
||||
// 表格所选中得id
|
||||
value(val) {
|
||||
this.selectedRowKeys = val
|
||||
this.selectedRowKeys = val,
|
||||
this.selectedRowKeysArray = val.join(',')
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.areaVisible = true
|
||||
},
|
||||
// 提交
|
||||
handleSubmit() {
|
||||
let postDate = []
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
let postDateobj = {}
|
||||
@@ -199,13 +254,11 @@ export default {
|
||||
postDateobj.id = item.id
|
||||
postDate.push(postDateobj)
|
||||
})
|
||||
console.log(postDate,'postDatepostDatepostDatepostDate')
|
||||
if(this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}else {
|
||||
postAction(this.url.add, postDate).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res,'lllll')
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
// _this.getlist()
|
||||
} else {
|
||||
@@ -220,164 +273,43 @@ export default {
|
||||
handleCody() {
|
||||
|
||||
},
|
||||
handleDel() {
|
||||
|
||||
},
|
||||
// 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()
|
||||
// },
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
// 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(){
|
||||
//
|
||||
// },
|
||||
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'))
|
||||
}
|
||||
},
|
||||
pageOnChange() {
|
||||
|
||||
},
|
||||
SizeChange() {
|
||||
|
||||
},
|
||||
// // 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()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user