[update] 拆分、首页

This commit is contained in:
danshihao
2024-06-28 16:20:54 +08:00
parent 254f4dbd72
commit bc206c480b
11 changed files with 146 additions and 27 deletions
+1 -1
View File
@@ -539,7 +539,7 @@
}
.ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
background-color: #ffd9d1 !important;
//background-color: #ffd9d1 !important;
}
.tree-operate-node {
+1 -1
View File
@@ -54,7 +54,7 @@ module.exports = {
newProduceVehiclesImplementationDate: 'Implementation date of new production vehicles',
newAuthVehiclesImplementationDate: 'Implementation date of new certified vehicle',
registrationDate: 'Registration date',
keywords: 'keywords',
keywords: 'Involving systems/components',
responsibleDepartment: 'Responsible department',
responsibleDepartmentModule: 'Responsible department professional module',
relatedDepartments: 'Related departments',
+1 -1
View File
@@ -54,7 +54,7 @@ module.exports = {
newProduceVehiclesImplementationDate: '新生产车实施日期',
newAuthVehiclesImplementationDate: '新认证车实施日期',
registrationDate: '注册日期',
keywords: '关键字',
keywords: '涉及系统/部件',
responsibleDepartment: '责任部门',
responsibleDepartmentModule: '责任部门专业模块',
relatedDepartments: '关联部门',
@@ -23,6 +23,11 @@ module.exports = {
applicableVehicleType: 'Applicable vehicle type', // 适用车型
dynamicType: 'Dynamic type', // 动力类型
inputExample: 'Input example:', // 输入示例
applicableComponents: 'Applicable components',
involvingSystemsComponents: 'Involving systems/components',
applications: 'Applicable vehicle models',
powerType: 'Power type',
responsibleDepartment: 'Responsible department',
// 外来标准法规文本库
foreignStandard: {
treeSearchPlaceholder: 'Please enter the tree system', // 请输入树状图体系
@@ -24,6 +24,11 @@ module.exports = {
applicableVehicleType: '适用车型', // 适用车型
dynamicType: '动力类型', // 动力类型
inputExample: '输入示例:',
applicableComponents: '适用零部件',
involvingSystemsComponents: '涉及系统/部件',
applications: '适用车型',
powerType: '动力类型',
responsibleDepartment: '责任部门',
// 外来标准法规文本库
foreignStandard: {
treeSearchPlaceholder: '请输入树状图体系',
+100 -6
View File
@@ -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;
+10 -12
View File
@@ -7,7 +7,7 @@
</div>
<div class="content-wrapper">
<div class="content-div" v-for="item in dataSource" :key="item.id" @click="clickLink(item)">
<img class="icon-img" :src="dataSource.logo || defaultLogo" :alt="item.name">
<img class="icon-img" :src="getImg(item.logoUrl)" :alt="item.name">
<a-tooltip placement="top">
<template slot="title">{{ item.name }}</template>
<p>{{ item.name }}</p>
@@ -19,7 +19,7 @@
</template>
<script>
import { getAction } from '@/api/manage'
import { getAction, getFileAccessHttpUrl } from '@/api/manage'
export default {
name: 'FriendLinkCard',
@@ -27,14 +27,7 @@ export default {
return {
defaultLogo: require('@/assets/image/dashboard/friendship-link.png'),
loading: false,
dataSource: [
{ name: '奇瑞官网' },
{ name: '奇瑞官网' },
{ name: '奇瑞官网' },
{ name: '奇瑞官网' },
{ name: '奇瑞官网' },
{ name: '奇瑞官网' }
],
dataSource: [],
url: {
list: '/sys/lawsFriendlyLinks/list'
}
@@ -44,12 +37,17 @@ export default {
this.loadData()
},
methods: {
getImg (id) {
if (!id) {
return this.defaultLogo
}
return getFileAccessHttpUrl(id)
},
loadData () {
this.loading = true
getAction(this.url.list, {}).then((res) => {
if (res.success) {
// grounding 1上架 0下架(只显示上架的)
this.dataSource = res.result.filter(item => item.grounding === '1')
this.dataSource = res.result
} else {
this.$message.warning(res.message)
}
+8 -3
View File
@@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<a-card :bordered="false" class="todo-card">
<a-spin :spinning="loading">
<div class="top-wrapper">
<p class="left-p"><i class="iconfont icon-calendar left-icon"></i>{{ $t('dashboard.todoTask.todoTask') }}</p>
@@ -34,7 +34,7 @@ export default {
}
},
created () {
// this.getTodoTask()
this.getTodoTask()
},
methods: {
// 获取待办任务
@@ -170,9 +170,11 @@ export default {
<style lang="less" scoped>
@size: 48px;
.todo-card {
height: calc(100vh - 611px);
}
.content-wrapper {
margin-top: 10px;
height: calc(100vh - 700px);
overflow-y: auto;
.content-item {
@@ -218,6 +220,9 @@ export default {
}
@media screen and (max-width: 1366px) {
@size: 40px;
.todo-card {
height: calc(100vh - 424px);
}
.content-wrapper {
height: calc(100vh - 506px);
@@ -378,7 +378,7 @@ export default {
dataIndex: 'registration_date',
scopedSlots: { customRender: 'text' }
},
{ // 关键字
{ // 关键字 -- 涉及系统/部件 同一个字段
title: this.$t('dashboard.advancedSearch.keywords'),
align: 'center',
width: 180,
@@ -170,6 +170,10 @@
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</template>
<!-- 文件查看 -->
<template slot="technical_specification_design_guide" slot-scope="{text, record}">
<a @click="handleViewFile(text, record)">{{ $t('view') }}</a>
</template>
</j-table>
</div>
</div>
@@ -183,6 +187,8 @@
<split-detail-batch-edit-drawer ref="batchEditDrawer" @ok="modalFormOk" />
<!--条款添加-->
<split-add-form ref="modalForm" :flag="'4'" :infoId="infoId" :menuId="menuId" :itemId="itemId" @ok="modalFormOk" />
<!--查看上传文件-->
<upload-file ref="uploadFile" :return-url="false" disabled />
</internal-detail-page>
</template>
@@ -211,10 +217,12 @@ import Search from '../../../components/customField/Search.vue'
import { isHasPermission } from '../../../utils/hasPermission.js'
import SplitDetailBatchEditDrawer from './modules/SplitDetailBatchEditDrawer.vue'
import { downFile, downloadFile, postAction } from '../../../api/manage'
import UploadFile from '@comp/UploadFile'
export default {
name: 'DocumentSplitDetail',
components: {
UploadFile,
InternalDetailPage,
JTable,
SplitAddForm,
@@ -281,7 +289,7 @@ export default {
downTemplateUrl: '/laws/DocumentTool/documentSplit/downloadImportTemplate' // 模板下载
},
disabledMixinsCreate: true,
tableSlotField: ['item_content', 'interpretation_articles'],
tableSlotField: ['item_content', 'interpretation_articles', 'technical_specification_design_guide'],
uploadData: {},
isBackTitle: true,
expandedKeys: []
@@ -326,6 +334,10 @@ export default {
this.loadMenuData()
},
methods: {
// 查看文件
handleViewFile (_, record) {
this.$refs.uploadFile.open(record.technical_specification_design_guide)
},
/**
* 树节点鼠标移入
* @param key
@@ -24,7 +24,7 @@ export default {
<style scoped lang="less">
.split-content {
height: 100vh;
padding: 20px 0 20px 20px;
padding: 20px;
background-color: #eff1f4;
}