修改文档详情
This commit is contained in:
@@ -16,7 +16,9 @@
|
|||||||
<a class="text" v-for="(ol,index) in OperationList"
|
<a class="text" v-for="(ol,index) in OperationList"
|
||||||
@click="OperationClick(ol,record)">{{ol.text}}</a>
|
@click="OperationClick(ol,record)">{{ol.text}}</a>
|
||||||
</span>
|
</span>
|
||||||
|
<span slot="detailClick" slot-scope="text,record">
|
||||||
|
<a class="text" @click="detailClick(record)">{{text}}</a>
|
||||||
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="page" v-if="dataSource.length > 0">
|
<div class="page" v-if="dataSource.length > 0">
|
||||||
@@ -74,16 +76,16 @@
|
|||||||
total: 0,
|
total: 0,
|
||||||
searchParmes: {},
|
searchParmes: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
orderBy:'1',
|
orderBy: '1',
|
||||||
orderByField:'',
|
orderByField: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
eventBUs.$on('searchQuery', search => {
|
eventBUs.$on('searchQuery', search => {
|
||||||
Object.keys(search).forEach(res=>{
|
Object.keys(search).forEach(res => {
|
||||||
if (search[res] instanceof Array){
|
if (search[res] instanceof Array) {
|
||||||
search[res] = search[res].join(',')
|
search[res] = search[res].join(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.searchParmes = search
|
this.searchParmes = search
|
||||||
this.getTableList()
|
this.getTableList()
|
||||||
@@ -103,7 +105,7 @@
|
|||||||
getAction(this.url.tableHeader, params).then((res) => {
|
getAction(this.url.tableHeader, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
var jsonHead = res.result
|
var jsonHead = res.result
|
||||||
jsonHead.forEach(res => {
|
jsonHead.forEach((res, index) => {
|
||||||
this.columns.push({
|
this.columns.push({
|
||||||
title: res.db_field_txt,
|
title: res.db_field_txt,
|
||||||
dataIndex: res.db_field_name,
|
dataIndex: res.db_field_name,
|
||||||
@@ -111,6 +113,11 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter: res.sort
|
sorter: res.sort
|
||||||
})
|
})
|
||||||
|
if (res.click) {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'detailClick'
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
let width
|
let width
|
||||||
if (this.OperationList.length > 0) {
|
if (this.OperationList.length > 0) {
|
||||||
@@ -138,8 +145,8 @@
|
|||||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||||
let params = {
|
let params = {
|
||||||
...this.searchParmes,
|
...this.searchParmes,
|
||||||
orderBy:this.orderBy,
|
orderBy: this.orderBy,
|
||||||
orderByField:this.orderByField,
|
orderByField: this.orderByField,
|
||||||
pageNo: pageNo + '',
|
pageNo: pageNo + '',
|
||||||
pageSize: pageSize + ''
|
pageSize: pageSize + ''
|
||||||
}
|
}
|
||||||
@@ -161,12 +168,15 @@
|
|||||||
this.getTableList()
|
this.getTableList()
|
||||||
},
|
},
|
||||||
onSelectChange(value) {
|
onSelectChange(value) {
|
||||||
this.selectedRowKeys = value;
|
this.selectedRowKeys = value
|
||||||
this.$emit('onSelectChange',value)
|
this.$emit('onSelectChange', value)
|
||||||
},
|
},
|
||||||
OperationClick(ol, item) {
|
OperationClick(ol, item) {
|
||||||
this.$emit(ol.ClickEvent, item)
|
this.$emit(ol.ClickEvent, item)
|
||||||
}
|
},
|
||||||
|
detailClick(item){
|
||||||
|
this.$emit('detailClick',item)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="doc-detail-header">
|
<div class="doc-detail-header">
|
||||||
<div class="doc-detail-title">
|
<div class="doc-detail-title">
|
||||||
<a-icon type="home" style="margin-right: 4px"/>
|
<a-icon type="home" style="margin-right: 4px"/>
|
||||||
GB 27999-2019 《乘用车燃料消耗量评价方法及指标》 标准详情
|
{{this.$route.query.serial_number}} 《{{this.$route.query.title}}》 标准详情
|
||||||
</div>
|
</div>
|
||||||
<div class="doc-detail-right">
|
<div class="doc-detail-right">
|
||||||
<a-button class="doc-detail-btn" type="primary">更新log</a-button>
|
<a-button class="doc-detail-btn" type="primary">更新log</a-button>
|
||||||
@@ -15,49 +15,45 @@
|
|||||||
<a-button class="doc-detail-btn" type="primary">知识问答库</a-button>
|
<a-button class="doc-detail-btn" type="primary">知识问答库</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div v-for="(item,index) in detailList">
|
||||||
<div class="header-text">
|
<div v-for="val in Object.keys(item)" class="content">
|
||||||
基本信息
|
<div class="header-text">
|
||||||
</div>
|
{{val}}
|
||||||
<div class="content-text">
|
|
||||||
<div class="text-field" v-for="(item,index) in 19" :key="index">
|
|
||||||
<span class="text-field-left" v-if="index == 1">标注实施日期</span>
|
|
||||||
<span class="text-field-left" v-else>编号</span>
|
|
||||||
<span class="text-field-right">GB 27999-8019</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="content-text" v-if="val == '基本信息'">
|
||||||
<div class="header-text">
|
<div class="text-field" v-for="(ol,index1) in item[val]">
|
||||||
文本信息
|
<span class="text-field-left">{{ol.db_field_txt}}</span>
|
||||||
</div>
|
<span class="text-field-right">{{ol.value ? ol.value : '--'}}</span>
|
||||||
<div class="TextInformation">
|
</div>
|
||||||
<div class="TextInformationContent" v-for="item in 10">
|
</div>
|
||||||
|
<div class="TextInformation" v-if="val == '文本信息'">
|
||||||
|
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
|
||||||
<span class="TextInformationContentLeft">
|
<span class="TextInformationContentLeft">
|
||||||
测试程序
|
{{ol.db_field_txt}}
|
||||||
</span>
|
</span>
|
||||||
<span class="TextInformationContentcontent">
|
<span class="TextInformationContentcontent">
|
||||||
123456.pdf
|
{{ol.value ? ol.value.fileName : '--'}}
|
||||||
</span>
|
</span>
|
||||||
<span class="TextInformationContentright">
|
<span class="TextInformationContentright">
|
||||||
<a-icon type="vertical-align-bottom"/>
|
|
||||||
下载
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="header-text">
|
|
||||||
文本信息
|
|
||||||
</div>
|
|
||||||
<div class="TextInformation">
|
|
||||||
<div class="TextInformationContent" v-for="item in 3">
|
|
||||||
<span class="TextInformationContentLeft">
|
|
||||||
测试程序
|
|
||||||
</span>
|
|
||||||
<span class="TextInformationContentcontent">
|
|
||||||
123456.pdf
|
|
||||||
</span>
|
|
||||||
<span class="TextInformationContentright">
|
|
||||||
<a-icon type="vertical-align-bottom"/>
|
<a-icon type="vertical-align-bottom"/>
|
||||||
下载
|
下载
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="TextInformation" v-else-if="val == '关联信息'">
|
||||||
|
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
|
||||||
|
<span class="TextInformationContentLeft">
|
||||||
|
{{ol.db_field_txt}}
|
||||||
|
</span>
|
||||||
|
<span class="TextInformationContentcontent">
|
||||||
|
{{ol.value ? ol.value.fileName : '--'}}
|
||||||
|
</span>
|
||||||
|
<span class="TextInformationContentright">
|
||||||
|
<a-icon type="vertical-align-bottom"/>
|
||||||
|
下载
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -84,8 +80,12 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInfoById() {
|
getInfoById() {
|
||||||
getAction(this.url.getInfo, { id: '559594408e50406b867dc6fa1b0a515c' }).then((res) => {
|
getAction(this.url.getInfo, { id: this.$route.query.id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.detailList = res.result
|
||||||
|
} else {
|
||||||
|
this.detailList = []
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
@Collection="Collection"
|
@Collection="Collection"
|
||||||
@subscribe="subscribe"
|
@subscribe="subscribe"
|
||||||
@onSelectChange="onSelectChange"
|
@onSelectChange="onSelectChange"
|
||||||
|
@detailClick="detailClick"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<addForm
|
<addForm
|
||||||
@@ -92,7 +93,8 @@
|
|||||||
updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑
|
updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑
|
||||||
getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看
|
getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看
|
||||||
deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch' //删除
|
deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch' //删除
|
||||||
}
|
},
|
||||||
|
idList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -115,6 +117,25 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
handleDel() {
|
handleDel() {
|
||||||
|
if (this.idList.length > 0){
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
content: '确认删除?',
|
||||||
|
onOk() {
|
||||||
|
deleteAction(_this.url.deleteBatch, { ids: _this.idList.join(',') }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
_this.$message.success(res.message)
|
||||||
|
_this.idList = []
|
||||||
|
eventBUs.$emit('searchReset')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$message.warning('请选择需要删除的数据')
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleCompare() {
|
handleCompare() {
|
||||||
@@ -146,7 +167,6 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
//收藏按钮
|
//收藏按钮
|
||||||
Collection(val) {
|
Collection(val) {
|
||||||
@@ -157,7 +177,13 @@
|
|||||||
console.log('val222', val)
|
console.log('val222', val)
|
||||||
},
|
},
|
||||||
onSelectChange(value){
|
onSelectChange(value){
|
||||||
|
this.idList = value
|
||||||
|
},
|
||||||
|
detailClick(item){
|
||||||
|
this.$router.push({
|
||||||
|
path:'/docManage/library/detail',
|
||||||
|
query:item
|
||||||
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user