Merge branch 'dev_20231101_TXSS' into 'dev_20230829_change'
Dev 20231101 txss See merge request laws-foton-slrs/foton-laws-system-front!122
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!--导出文件改名字模态框-->
|
||||
<el-dialog :visible.sync="exportModelFlag" title="导出文件" width="300px">
|
||||
<el-dialog :visible.sync="exportModelFlag" title="导出文件" width="300px" :append-to-body="appendToBody">
|
||||
<el-form :inline="true" class="label-input-form search-area">
|
||||
<el-form-item label="导出名称" class="search-item">
|
||||
<el-input v-model="exportName" placeholder="请输入导出文件名称" :maxlength="30" clearable label="导出名称"/>
|
||||
@@ -22,6 +22,12 @@ export default {
|
||||
exportName: ''
|
||||
}
|
||||
},
|
||||
props: {
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openModel () {
|
||||
this.exportName = ''
|
||||
|
||||
@@ -3272,8 +3272,14 @@ export default {
|
||||
if (checkedData) {
|
||||
if (checkedData.length > 0) {
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.map(item => item.menuName).join(",")
|
||||
this.sarStandardsInfoEO.standSystemId = checkedIds.join(",")
|
||||
} else {
|
||||
if (checkedData.parentId == null || checkedData.parentId === '') {
|
||||
this.$message.error('请选择二级及以下目录')
|
||||
return
|
||||
}
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.menuName
|
||||
this.sarStandardsInfoEO.standSystemId = checkedIds
|
||||
}
|
||||
}
|
||||
this.modalShowFlag1 = false
|
||||
|
||||
@@ -2862,8 +2862,14 @@ export default {
|
||||
if (checkedData) {
|
||||
if (checkedData.length > 0) {
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.map(item => item.menuName).join(",")
|
||||
this.sarStandardsInfoEO.standSystemId = checkedIds.join(",")
|
||||
} else {
|
||||
if (checkedData.parentId == null || checkedData.parentId === '') {
|
||||
this.$message.error('请选择二级及以下目录')
|
||||
return
|
||||
}
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.menuName
|
||||
this.sarStandardsInfoEO.standSystemId = checkedIds
|
||||
}
|
||||
}
|
||||
this.modalShowFlag1 = false
|
||||
|
||||
@@ -0,0 +1,375 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="visible" custom-class="customDialog" width="1005px">
|
||||
<div class="search-area">
|
||||
<el-form :modal="searchForm" :inline="true" class="label-input-form">
|
||||
<el-form-item label="标准编号" class="search-item">
|
||||
<el-input v-model="searchForm.standNo"
|
||||
placeholder="根据标准编号查找"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标准名称" class="search-item">
|
||||
<el-input v-model="searchForm.standName"
|
||||
placeholder="根据标准名称查找"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标准状态" class="search-item">
|
||||
<el-select v-model="searchForm.standState"
|
||||
placeholder="请选择标准状态">
|
||||
|
||||
<el-option v-for="item in dict.commonState" :value="item.value" :label="item.label"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源" class="search-item">
|
||||
<el-select v-model="searchForm.dataSource"
|
||||
placeholder="请选择数据来源">
|
||||
<el-option value="INLAND" label="国内标准库"></el-option>
|
||||
<el-option value="FOREIGN" label="海外标准库"></el-option>
|
||||
<el-option value="ENTERPRISE" label="企业标准库"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期" class="search-item">
|
||||
<el-date-picker
|
||||
:value="releaseDate"
|
||||
:picker-options="pickerOptions"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="起始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
align="right"
|
||||
@input="releaseDateChange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="实施日期" class="search-item">
|
||||
<el-date-picker
|
||||
:value="implementDate"
|
||||
:picker-options="pickerOptions"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="起始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
align="right"
|
||||
@input="implementDateChange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="代替标准" class="search-item">
|
||||
<el-input v-model="searchForm.replaceStandardNo"
|
||||
placeholder="根据代替标准查找"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编制单位" class="search-item">
|
||||
<el-input v-model="searchForm.dept"
|
||||
placeholder="根据编制单位查找"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="起草人" class="search-item">
|
||||
<el-input v-model="searchForm.draftUserName"
|
||||
placeholder="根据起草人查找"
|
||||
clearable
|
||||
:maxlength="100"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
size="mini"
|
||||
@click="onSearch"
|
||||
>查询</el-button>
|
||||
<el-button class="common-button-default"
|
||||
size="mini"
|
||||
@click="onResetSearch"
|
||||
>清空</el-button>
|
||||
<el-button class="common-button-default export-button"
|
||||
@click="exportData"
|
||||
size="mini"
|
||||
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
|
||||
><i class="iconfont"></i>列表导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="selections"
|
||||
:data="data"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
|
||||
border
|
||||
:height="400"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',fontWeight: 'bold', height: '48px'}"
|
||||
@sort-change="sortChange"
|
||||
@selection-change="selectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standSystem"
|
||||
width="200"
|
||||
label="体系结构">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standNo"
|
||||
width="200"
|
||||
label="标准编号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standName"
|
||||
width="200"
|
||||
label="标准名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standState"
|
||||
width="80"
|
||||
label="标准状态">
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<span v-if="dict.commonState">{{ this.dict.commonState.find(item => item.value === scope.row.standState).label }}</span>-->
|
||||
<!--</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="releaseDate"
|
||||
width="110"
|
||||
sortable
|
||||
label="发布日期">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="implementDate"
|
||||
width="110"
|
||||
sortable="custom"
|
||||
label="实施日期">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="replaceStandardNo"
|
||||
width="120"
|
||||
label="代替标准">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dept"
|
||||
width="150"
|
||||
label="编制单位">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="draftUserName"
|
||||
width="200"
|
||||
label="起草人">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dataSource"
|
||||
width="100"
|
||||
label="数据来源">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
style="position: relative;"
|
||||
:page="searchForm.page"
|
||||
:total="searchForm.total"
|
||||
@pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"></pagination>
|
||||
<div slot="footer" class="demo-drawer-footer">
|
||||
<el-button class="common-button-default" round icon="el-icon-close" @click="onCancel">取消</el-button>
|
||||
</div>
|
||||
<loading :loading="loading">加载中...</loading>
|
||||
<ExportDialog appendToBody ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ExportDialog from '@/components/hzwlComponents/exportDialog'
|
||||
|
||||
export default {
|
||||
name: "DialogTable",
|
||||
components: {
|
||||
ExportDialog
|
||||
},
|
||||
data () {
|
||||
const pickerOptions = {
|
||||
shortcuts: [{
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}]
|
||||
}
|
||||
const searchForm = {
|
||||
menuId: '',
|
||||
standNo: '',
|
||||
standName: '',
|
||||
standState: '',
|
||||
startReleaseDate: '',
|
||||
endReleaseDate: '',
|
||||
startImplementDate: '',
|
||||
endImplementDate: '',
|
||||
replaceStandardNo: '',
|
||||
dept: '',
|
||||
draftUserName: '',
|
||||
page: 1,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
total: 0,
|
||||
sortField: '',
|
||||
sortMode: '',
|
||||
}
|
||||
return {
|
||||
visible: false,
|
||||
title: '技术标准',
|
||||
searchForm,
|
||||
initSearchForm: JSON.parse(JSON.stringify(searchForm)),
|
||||
pickerOptions,
|
||||
releaseDate: ['', ''],
|
||||
implementDate: ['', ''],
|
||||
dict: {},
|
||||
data: [],
|
||||
selected: [],
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDicTypeListCode()
|
||||
},
|
||||
methods: {
|
||||
open (cfg) {
|
||||
this.visible = true
|
||||
this.title = `${cfg.menuName}( ${cfg.gbStandCount}/${cfg.fbStandCount}/${cfg.esStandCount} )`
|
||||
this.initSearchForm.menuId = cfg.id
|
||||
this.resetSearchForm()
|
||||
this.onSearch()
|
||||
},
|
||||
onSearch () {
|
||||
this.loading = true
|
||||
this.$http._postData('lawss/sarMenuStandardLimit/standardSystemList', this.searchForm).then(res => {
|
||||
if (res.ok) {
|
||||
this.data = res.data.records
|
||||
this.searchForm.total = res.data.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
onCancel () {
|
||||
this.resetSearchForm()
|
||||
this.visible = false
|
||||
},
|
||||
onResetSearch () {
|
||||
this.resetSearchForm()
|
||||
this.onSearch()
|
||||
},
|
||||
resetSearchForm () {
|
||||
this.searchForm = JSON.parse(JSON.stringify(this.initSearchForm))
|
||||
this.releaseDate = ['', '']
|
||||
this.implementDate = ['', '']
|
||||
this.selected = []
|
||||
},
|
||||
releaseDateChange (event) {
|
||||
if (!event) {
|
||||
this.releaseDate = ['', '']
|
||||
this.searchForm.startReleaseDate = ''
|
||||
this.searchForm.endReleaseDate = ''
|
||||
return
|
||||
}
|
||||
this.releaseDate = event
|
||||
const startTime = event[0]
|
||||
const endTime = event[1]
|
||||
this.searchForm.startReleaseDate = startTime
|
||||
this.searchForm.endReleaseDate = endTime
|
||||
},
|
||||
implementDateChange (event) {
|
||||
if (!event) {
|
||||
this.implementDate = ['', '']
|
||||
this.searchForm.startImplementDate = ''
|
||||
this.searchForm.endImplementDate = ''
|
||||
return
|
||||
}
|
||||
this.implementDate = event
|
||||
const startTime = event[0]
|
||||
const endTime = event[1]
|
||||
this.searchForm.startImplementDate = startTime
|
||||
this.searchForm.endImplementDate = endTime
|
||||
},
|
||||
pageChange (page) {
|
||||
this.searchForm.page = page
|
||||
this.onSearch()
|
||||
},
|
||||
pageSizeChange (pageSize) {
|
||||
this.searchForm.pageSize = pageSize
|
||||
this.onSearch()
|
||||
},
|
||||
selectionChange (row) {
|
||||
this.selected = row
|
||||
},
|
||||
sortChange ({ column, prop, order }) {
|
||||
this.searchForm.sortField = prop
|
||||
this.searchForm.sortMode = 'asc'
|
||||
if (order === 'descending') {
|
||||
this.searchForm.sortMode = 'desc'
|
||||
}
|
||||
if (!order) {
|
||||
this.searchForm.sortField = ''
|
||||
this.searchForm.sortMode = ''
|
||||
}
|
||||
this.onSearch()
|
||||
},
|
||||
// 导出
|
||||
exportData () {
|
||||
this.$refs.exportDialogRef.openModel()
|
||||
},
|
||||
handleExport (exportName) {
|
||||
const selectIds = this.selected.map(item => item.standId).join(',')
|
||||
const params = {
|
||||
...this.searchForm,
|
||||
exportName: exportName,
|
||||
selectIds
|
||||
}
|
||||
let query = '?'
|
||||
for(let i in params){
|
||||
if (params[i] && params[i]!=='') {
|
||||
query = query + i + '=' + params[i] + '&'
|
||||
}
|
||||
}
|
||||
query = query.slice(0,-1)
|
||||
window.open('/api/lawss/sarMenuStandardLimit/standardSystemListExport' + query)
|
||||
this.$refs.exportDialogRef.cancel()
|
||||
this.$message.success('导出信息成功')
|
||||
},
|
||||
getDicTypeListCode () {
|
||||
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
|
||||
this.dict = { ...res.data }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
/deep/ .customDialog {
|
||||
.el-dialog__body {
|
||||
padding: 0 20px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,14 +1,25 @@
|
||||
<template>
|
||||
<div class="root">
|
||||
<div id="mountNode" ref="mountNode"></div>
|
||||
<DialogTable ref="DialogTableRef"></DialogTable>
|
||||
<loading :loading="loading">加载中...</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import G6 from '@antv/g6';
|
||||
|
||||
import DialogTable from "./components/DialogTable";
|
||||
|
||||
export default {
|
||||
name: "systemSearch",
|
||||
components: {
|
||||
DialogTable
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
data: {}
|
||||
data: {},
|
||||
loading: false,
|
||||
// data: {
|
||||
// // 点集
|
||||
// nodes: [
|
||||
@@ -41,15 +52,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getData () {
|
||||
this.$http.get('wg_work_group/researchData', {
|
||||
type: '0'
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.data = res.data
|
||||
this.initGraph()
|
||||
}
|
||||
this.loading = true
|
||||
this.$http._getData('lawss/sarMenuStandardLimit/standardSystemTree').then(res => {
|
||||
if (res.ok) {
|
||||
this.data = res.data[0]
|
||||
this.initGraph()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
initGraph(){
|
||||
@@ -69,7 +79,7 @@ export default {
|
||||
const outDiv = document.createElement('div');
|
||||
// outDiv.style.maxWidth = '200px';
|
||||
outDiv.innerHTML = `
|
||||
<div>${cfg.name}( 100/100/100 )</div>`
|
||||
<div>${cfg.menuName}( ${cfg.gbStandCount}/${cfg.fbStandCount}/${cfg.esStandCount} )</div>`
|
||||
return outDiv
|
||||
},
|
||||
itemTypes: ['node']
|
||||
@@ -108,7 +118,9 @@ export default {
|
||||
y: (h - 10) / 2,
|
||||
fontSize: 12,
|
||||
lineHeight: 20,
|
||||
text: cfg.name.length > 5 ? `${cfg.name.slice(0,5)}...( 100/100/100 )` : `${cfg.name}( 100/100/100 )`,
|
||||
text: cfg.menuName.length > 5
|
||||
? `${cfg.menuName.slice(0,5)}...( ${cfg.gbStandCount}/${cfg.fbStandCount}/${cfg.esStandCount} )`
|
||||
: `${cfg.menuName}( ${cfg.gbStandCount}/${cfg.fbStandCount}/${cfg.esStandCount} )`,
|
||||
fill: '#000',
|
||||
textAlign: 'center',
|
||||
cursor: 'pointer',
|
||||
@@ -123,21 +135,21 @@ export default {
|
||||
y: h,
|
||||
r: 6,
|
||||
cursor: 'pointer',
|
||||
symbol: G6.Marker.collapse,
|
||||
symbol: cfg.level <= 1 ? G6.Marker.collapse : G6.Marker.expand,
|
||||
stroke: '#666',
|
||||
lineWidth: 1,
|
||||
fill: '#fff',
|
||||
},
|
||||
name: 'collapse-icon',
|
||||
});
|
||||
if (cfg.level === '0') {
|
||||
if (cfg.level === 0) {
|
||||
const rect = group.find((ele) => ele.get('name') === 'box') // 获取图形
|
||||
rect.attr('fill', mainColor)
|
||||
rect.attr('stroke', mainColor) // 边框颜色
|
||||
|
||||
const text = group.find((ele) => ele.get('name') === 'text') // 获取图形
|
||||
text.attr('fill','#fff')
|
||||
} else if (cfg.level === '1') {
|
||||
} else if (cfg.level === 1) {
|
||||
const rect = group.find((ele) => ele.get('name') === 'box') // 获取图形
|
||||
rect.attr('fill', '#eee')
|
||||
rect.attr('stroke', '#eee')
|
||||
@@ -302,6 +314,7 @@ export default {
|
||||
graph.render(); // 渲染图
|
||||
// graph.fitView()
|
||||
graph.fitCenter()
|
||||
// graph.focusItem(this.data.id)
|
||||
this.initGraphEvent(graph)
|
||||
},
|
||||
setCollapse () {
|
||||
@@ -340,8 +353,10 @@ export default {
|
||||
e.item.getModel().collapsed = !e.item.getModel().collapsed;// 设置是否展开
|
||||
graph.setItemState(e.item, 'collapsed', e.item.getModel().collapsed);// 设置当前节点的 click 状态
|
||||
} else {
|
||||
console.log('打开窗口',e.item.getModel())
|
||||
alert('node:click')
|
||||
// console.log(e)
|
||||
// console.log('打开窗口',e.item.getModel())
|
||||
const cfg = e.item.getModel()
|
||||
this.$refs.DialogTableRef.open(cfg)
|
||||
}
|
||||
|
||||
graph.layout();
|
||||
@@ -364,6 +379,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#mountNode{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user