[update] 拆分、首页
This commit is contained in:
@@ -1,5 +1,74 @@
|
||||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<!-- 搜索条件 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--适用零部件-->
|
||||
<a-col :md="4" :sm="12">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.applicableComponents')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.applicableComponents')"
|
||||
v-model="queryParam.applicable_components"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--涉及系统/部件-->
|
||||
<a-col :md="4" :sm="12">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.involvingSystemsComponents')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.involvingSystemsComponents')"
|
||||
v-model="queryParam.keywords"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--适用车型-->
|
||||
<a-col :md="4" :sm="12">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.applications')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.applications"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.applications')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
dictCode="applicable_vehicle_type" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--动力类型-->
|
||||
<a-col :md="4" :sm="12">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.powerType')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.power_type"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.powerType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
dictCode="dynamic_type" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--责任部门-->
|
||||
<a-col :md="4" :sm="12">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.responsibleDepartment')">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.responsible_department"
|
||||
:maxTagCount="1"
|
||||
allowClear
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="categoryTreeList"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.responsibleDepartment')"
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<div style="float: right;overflow: hidden;margin-right: 16px" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'split:sarFileSplitInfo:search'">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 拖拽中不能选中内容 -->
|
||||
<div class="sheet-box" :class="{ disabledSelect: isDragging }" ref="sheetBoxRef">
|
||||
<!--标准目录-->
|
||||
@@ -126,6 +195,7 @@
|
||||
import { getDocSplitEditForm, previewDocSplit } from '@api/documentToolApi'
|
||||
import { FieldType } from '@/enums/commonEnums'
|
||||
import VueDraggableResizable from 'vue-draggable-resizable'
|
||||
import { queryDepartTreeList } from '@api/api'
|
||||
|
||||
export default {
|
||||
name: 'StandardResolutionSheet',
|
||||
@@ -142,6 +212,8 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
queryParam: {},
|
||||
categoryTreeList: [], // 组织机构下拉框数据
|
||||
showClauseLabel: true, // 是否展示条文标签
|
||||
// 条文标签字段
|
||||
clauseField: [],
|
||||
@@ -168,11 +240,35 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getSysCategoryTree()
|
||||
// 容器实际剩余宽度 = 右侧内容宽度 - 内容中的间距
|
||||
const boxWidth = this.$refs.sheetBoxRef.getBoundingClientRect().width - this.$refs.translationRef.getBoundingClientRect().width - (16 * 4)
|
||||
this.sheetContainerRefX = boxWidth - this.standardCatalogueRefX - this.clauseLabelRefX
|
||||
},
|
||||
methods: {
|
||||
// 获取组织机构树
|
||||
getSysCategoryTree () {
|
||||
queryDepartTreeList().then((res) => {
|
||||
if (res.success) {
|
||||
this.categoryTreeList = res.result
|
||||
} else {
|
||||
this.categoryTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
// 查询
|
||||
searchQuery () {
|
||||
this.initDetailInfo(this.queryParam)
|
||||
},
|
||||
// 重置
|
||||
searchReset () {
|
||||
this.queryParam = {}
|
||||
this.initDetailInfo()
|
||||
},
|
||||
/**
|
||||
* 拖拽回调
|
||||
* @param min - 拖拽最小宽度
|
||||
@@ -216,11 +312,9 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
initDetailInfo () {
|
||||
initDetailInfo (queryParams) {
|
||||
this.loading = true
|
||||
const params = {
|
||||
...this.queryParams
|
||||
}
|
||||
const params = Object.assign({}, this.queryParams, queryParams)
|
||||
if (this.horizontalOverstep) {
|
||||
params.horizontalOverstep = true
|
||||
}
|
||||
@@ -330,7 +424,7 @@ export default {
|
||||
.sheet-box {
|
||||
overflow-x: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: calc(100% - 56px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -418,7 +512,7 @@ export default {
|
||||
position: relative;
|
||||
width: 400px;
|
||||
height: 100%;
|
||||
margin-right: 16px;
|
||||
margin-right: 3px;
|
||||
//overflow: hidden;
|
||||
transition: width .2s linear;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user