[add] 参数项收集清单

This commit is contained in:
zhaomeijing
2022-05-09 18:05:30 +08:00
parent 600b7fcb98
commit db8281d25b
3 changed files with 66 additions and 35 deletions
@@ -52,7 +52,7 @@
<ProjectDetailsName v-if="textTitle === '项目详情'"/> <ProjectDetailsName v-if="textTitle === '项目详情'"/>
<listOfRegulations v-else-if="textTitle === '法规清单'"/> <listOfRegulations v-else-if="textTitle === '法规清单'"/>
<TaskList v-else-if="textTitle === '任务清单'"/> <TaskList v-else-if="textTitle === '任务清单'"/>
<ParameterItemCollectionList item collection v-else-if="textTitle === '认证参数收集'"/> <ParameterItemCollectionList v-else-if="textTitle === '认证参数收集'" :paramsManifest='paramsManifest'/>
<nonConformance v-else-if="textTitle === '未符合项'"/> <nonConformance v-else-if="textTitle === '未符合项'"/>
</div> </div>
</div> </div>
@@ -92,11 +92,13 @@ export default {
url: { url: {
logList: '', logList: '',
historicalVersionUrl: '' historicalVersionUrl: ''
} },
paramsManifest: {},
} }
}, },
mounted() { mounted() {
this.textColor() this.textColor()
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
}, },
methods: { methods: {
textColor() { textColor() {
@@ -113,22 +113,22 @@
/> />
</div> </div>
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null"> <a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
<parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle' <!-- <parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'-->
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template> <!-- :selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template>-->
</a-modal> </a-modal>
<configure ref="configureRef" :url='url' :itemId='itemId'/> <!-- <configure ref="configureRef" :url='url' :itemId='itemId'/>-->
</a-card> </a-card>
</template> </template>
<script> <script>
// import ImportFile from '@/components/ImportFile/index' // import ImportFile from '@/components/ImportFile/index'
// import ParameterTemplate from '../dialog/ParameterTemplate' // import ParameterTemplate from '../dialog/ParameterTemplate'
// import { getAction,postAction } from '../../../api/manage' import { getAction,postAction } from '../../../api/manage'
// import Configure from '../dialog/configure' // import Configure from '../dialog/configure'
import axios from 'axios' import axios from 'axios'
export default { export default {
name: 'TaskParameterCollection', name: 'ParameterItemCollectionList',
// components:{ // components:{
// ImportFile, // ImportFile,
// ParameterTemplate, // ParameterTemplate,
@@ -184,14 +184,15 @@ export default {
selectedRowKeys: [], selectedRowKeys: [],
queryParam: {}, queryParam: {},
url: { url: {
list: 'params/manifest/page', getHeader: 'params/collectManifest/getHeader',
add: 'params/manifest/add', list: 'params/collectManifest/list',
edit: 'params/manifest/edit', // add: 'params/manifest/add',
queryById: 'params/manifest/queryById', // edit: 'params/manifest/edit',
deleteBatch: 'params/manifest/delete', // queryById: 'params/manifest/queryById',
deleteAll: 'params/manifest/deleteBatch', // deleteBatch: 'params/manifest/delete',
conAdd: 'params/config/addBatch', // deleteAll: 'params/manifest/deleteBatch',
conList: 'params/config/list', // conAdd: 'params/config/addBatch',
// conList: 'params/config/list',
}, },
loading: false, loading: false,
dataSource: [], dataSource: [],
@@ -208,8 +209,14 @@ export default {
itemId: '' itemId: ''
} }
}, },
props: {
paramsManifest: {
type: Object,
default: {},
require: true
}
},
mounted() { mounted() {
this.getlist()
}, },
methods:{ methods:{
paramsManifestClick(item) { paramsManifestClick(item) {
@@ -224,14 +231,14 @@ export default {
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmDelete'), content: _this.$t('ConfirmDelete'),
onOk() { onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => { // getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) { // if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) // _this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist() // _this.getlist()
} else { // } else {
_this.$message.warning(_this.$t('operationFailed')) // _this.$message.warning(_this.$t('operationFailed'))
} // }
}) // })
} }
}) })
}, },
@@ -268,9 +275,9 @@ export default {
this.areaVisible = true this.areaVisible = true
let _this = this let _this = this
let query = { let query = {
id: edit.id paramsManifestId: this.paramsManifest.id
} }
getAction(_this.url.queryById, query).then((res) => { getAction(_this.url.getHeader, query).then((res) => {
if (res.success) { if (res.success) {
console.log(res,'res..') console.log(res,'res..')
this.templatetitle = res.result.title this.templatetitle = res.result.title
@@ -326,15 +333,32 @@ export default {
}, },
getlist() { getlist() {
let query = { let query = {
pageSize: this.pageSize, paramsManifestId: this.paramsManifest.id,
pageNo: this.pageNo, flag: '7'
...this.queryParam
} }
console.log(this.$route.query,'this.query') console.log(this.paramsManifest,'this.paramsManifestthis.paramsManifestthis.paramsManifest')
getAction(this.url.list, query).then((res) => { getAction(this.url.getHeader, query).then((res) => {
if(res.success) { if(res.success) {
this.total = res.result.total console.log(res,'头部,,,')
this.dataSource = res.result.records || [] // 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 this.loading = false
} else { } else {
this.loading = false this.loading = false
@@ -342,6 +366,11 @@ export default {
}) })
} }
}, },
watch: {
paramsManifest(newVal, oldVal) {
this.getlist()
}
}
} }
</script> </script>
@@ -173,10 +173,10 @@
}, },
methods:{ methods:{
paramsManifestClick(item) { paramsManifestClick(item) {
let Obj = {...item, ...this.$route.query} localStorage.setItem('paramsManifest',JSON.stringify(item))
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/ParameterItemCollection', path: '/ParameterItemCollection',
query: Obj, query: this.$route.query,
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
}, },