法规符合性看板高级搜索

This commit is contained in:
zyx.net
2022-07-18 15:53:44 +08:00
parent 792a21ffaf
commit a4ffe63129
2 changed files with 23 additions and 149 deletions
@@ -20,7 +20,7 @@
</a-col> </a-col>
<a-col :span='9'> <a-col :span='9'>
<a-form-model-item :label="$t('RelatedItems')" prop='ListTitle'> <a-form-model-item :label="$t('RelatedItems')" prop='ListTitle'>
<a-select class="box-input" v-model="formData.projectName" <a-select class="box-input" v-model="formData.projectNameId"
:placeholder="$t('PleaseSelect')+$t('RelatedItems')"> :placeholder="$t('PleaseSelect')+$t('RelatedItems')">
<a-select-option v-for="(element,index) in RelatedItemList" :key="element.id" :value="element.id"> <a-select-option v-for="(element,index) in RelatedItemList" :key="element.id" :value="element.id">
{{element.projectName}} {{element.projectName}}
@@ -163,35 +163,19 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
listVisible: false, listVisible: false,
listVisibleRowDate: {}
} }
}, },
props: { props: {
version: {
type: Number,
default: '',
required: false
},
projectId: {
type: String,
default: '',
require: true
},
item: { item: {
type: String, type: Object,
default: '', default: '',
require: true require: true
}, },
paramsManifestId: { paramsManifestId: {
type: Object, type: String,
default: '', default: '',
require: true require: true
}, },
url: {
type: Object,
default: '',
require: true
}
}, },
mounted() { mounted() {
this.loadData() this.loadData()
@@ -205,27 +189,6 @@ export default {
} }
}) })
}, },
// 清单列表传出数据
listVisibleRow(val) {
this.selectedRowKeys = []
let newAreaTable=JSON.parse(JSON.stringify(this.areaTable))
newAreaTable.forEach((item, index) => {
if( item.id == this.listVisibleRowDate.id ) {
let _obj = {...item}
_obj.paramsTemplateId = val[0].id
_obj.paramsTemplateName = val[0].paramsTemplateName
this.areaTable.splice(index, 1,_obj)
}
})
console.log(this.areaTable,'this.areaTable')
this.listVisible = false
},
// 下载文件
editArea(val) {
// this.listVisibleRowDate = val
console.log(val)
// this.listVisible = true
},
pageOnChange(page, pageSize) { pageOnChange(page, pageSize) {
this.pageNo = page this.pageNo = page
this.loadData() this.loadData()
@@ -254,34 +217,22 @@ export default {
} }
}) })
}, },
dowloadfile(item){
let query = {
id: item.exportFileId
}
downloadFile('/sys/common/downLoadFile', item.exportFileName, query, this.Deselect)
},
loadData() { loadData() {
let _this = this
let queryParam = JSON.parse(JSON.stringify(this.formData))
if(!this.formData.dutyTerritory){
this.formData.dutyTerritory = ''
}
if(!this.formData.projectNameId){
this.formData.projectNameId = ''
}
let params = { let params = {
id:this.paramsManifestId, id:this.paramsManifestId,
dutyTerritory:this.formData.dutyTerritory, dutyTerritory:this.formData.dutyTerritory?this.formData.dutyTerritory:'',
projectName:this.formData.projectName, projectName:this.formData.projectName,
projectNameId:this.formData.projectNameId, projectNameId:this.formData.projectNameId?this.formData.projectNameId:'',
} }
this.loading = true
getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => { getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => {
if (res.success) { if (res.success) {
this.areaTable = res.result.complianceResultList this.areaTable = res.result.complianceResultList
this.opinionGather = res.result.opinionGather this.opinionGather = res.result.opinionGather
this.technologyEvaluation = res.result.technologyEvaluation this.technologyEvaluation = res.result.technologyEvaluation
this.loading = false
}else{
this.loading = false
} }
}) })
}, },
@@ -315,65 +266,6 @@ export default {
this.newVisible = true this.newVisible = true
this.form = {} this.form = {}
}, },
//新增
handleSubmit() {
let _this = this
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
let _tt = {
paramsTemplateId: this.selectedRowKeysDate[0].paramsTemplateId,
projectId: this.selectedRowKeysDate[0].projectId,
title: this.selectedRowKeysDate[0].title,
paramsTemplatePublishVersion: this.selectedRowKeysDate[0].paramsTemplatePublishVersion,
sourceManifestId: this.selectedRowKeysDate[0].id,
}
axios({
url: `/jero-boot/params/manifest/copy`,
method: 'post',
data: _tt,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':_this.token
}
})
.then( (res) =>{
if (res.data.success) {
_this.$emit('copysubmit')
_this.$message.success(res.data.message)
_this.flag = false
_this.spinLoading = false
_this.confirmLoading = false
}else{
_this.$message.warning(res.data.message)
_this.flag = false
_this.spinLoading = false
_this.confirmLoading = false
}
})
.catch( (error) =>{
console.log(error);
});
} else {
return false
}
})
}
},
}, },
watch: { watch: {
selectedRowKeyS(val) { selectedRowKeyS(val) {
+14 -32
View File
@@ -148,38 +148,7 @@ export default {
{ required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' } { required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' }
] ]
}, },
fieldList: [ fieldList: [],
{
type: 'string',
value: 'serialNumber',
text: this.$t('standard')
},
{
type: 'string',
value: 'title',
text: this.$t('title')
},
{
type: '',
value: ' state',
text: this.$t('status'),
dictCode: 'state'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
// {
// type: 'string',
// value: 'technologyTerritory',
// text: this.$t('category')
// },
{
type: 'tree',
value: 'technologyTerritory',
text: this.$t('technicalField'),
tree:this.CategoryTreeList
// value: 'technologyTerritory',
// text: this.$t('technicalField'),
// dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
],
visible: false, visible: false,
dataSource: [], dataSource: [],
confirmLoading: false, confirmLoading: false,
@@ -235,8 +204,21 @@ export default {
mounted() { mounted() {
this.getList() this.getList()
this.getSysCategoryTree() this.getSysCategoryTree()
this.queryConditionInventory()
}, },
methods: { methods: {
queryConditionInventory() {
let query = {
flag: 1
}
getAction('/project/projectLawsInventoryEO/queryConditionInventory', query).then((res) => {
if (res.success) {
this.fieldList = res.result || []
} else {
this.fieldList = []
}
})
},
handleCancel() { handleCancel() {
this.areaVisible = false this.areaVisible = false
}, },