修改项目详情的编辑

2.法规清单编辑内容没有更新
This commit is contained in:
qq787203167
2022-04-20 18:07:13 +08:00
parent 78f4e4a706
commit 17dde52ed8
2 changed files with 32 additions and 6 deletions
@@ -162,28 +162,46 @@
</a-tab-pane>
</a-tabs>
<listOfRelevantPersonnel ref="listOfRelevantPersonnelRef"/>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import listOfRelevantPersonnel from './listOfRelevantPersonnel'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import addModel from './addModel'
export default {
name: 'ProjectDetails',
components: {
listOfRelevantPersonnel
listOfRelevantPersonnel,
addModel
},
data() {
return {
queryForm: {}
queryForm: {},
url: {
queryById: 'project/projectLibraryBase/queryById',
add: 'project/projectLibraryBase/add',
edit: 'project/projectLibraryBase/edit'
}
}
},
mounted() {
this.queryForm = this.$route.query
this.getForm()
this.mainEcharts()
},
methods: {
getForm() {
getAction(this.url.queryById, { id: this.$route.query.id }).then((res) => {
if (res.success) {
this.queryForm = res.result[0] || {}
} else {
this.queryForm = {}
}
})
},
mainEcharts() {
var myChart = echarts.init(document.getElementById('main'))
myChart.setOption({
@@ -212,9 +230,12 @@
window.open(val)
}
},
edit(){
edit() {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(this.queryForm)))
},
addModelList() {
this.getForm()
}
}
}
</script>
@@ -760,7 +760,12 @@
},
editModel(item) {
this.visible = true
this.queryPersonByProject(item)
if (item.dutyTerritory) {
this.queryPersonByProject(item)
} else {
this.formInline = item
this.formInline = { ...this.formInline }
}
this.$nextTick(() => {
this.rules = {}
switch (item.roleCode) {