update 国内标准分享

This commit is contained in:
赵霄
2023-09-12 17:35:31 +08:00
parent 9c296ace14
commit 5fab579e09
6 changed files with 160 additions and 32 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ const getDomesticStandardDocumentInfo = (params) => getAction('/laws/standard/do
// 国内法规标准-获取表头信息
const getDomesticStandardTableHeader = (params) => getAction('/laws/standard/domestic/getCommonHeader', params)
// 国内标准法规-收藏
const collectionDomesticStandard = (params) => postAction('', params)
const collectionDomesticStandard = (params) => postAction('/personal/lawsStandardCollection/domestic/add', params)
// 国内标准法规-分享
const shareDomesticStandard = (params) => postAction('', params)
const shareDomesticStandard = (params) => postAction('/personal/lawsStandardSharing/domestic/add', params)
// 国内标准-体系新增
const addDomesticSystemTree = (params) => postAction('/laws/standard/lawsTreeNode/domestic/add', params)
// 国内标准-体系编辑
+12 -1
View File
@@ -18,6 +18,17 @@ module.exports = {
uninvolved: 'Not involve', // 不涉及
regulationsList: 'List of regulations', // 法规清单
standardNumberStandardName: 'Standard number/Standard name', // 标准号/标准名称
transfer: 'Transfer' // 调取
transfer: 'Transfer', // 调取
standardNumber: 'Standard number', // 标准号
standardName: 'Standard name', // 标准名称
englishName: 'English name', // 英文名称
standardState: 'Standard state', // 标准状态
applicableVehicleType: 'Applicable vehicle type', // 适用车型
productionDate: 'On the production date', // 在产车实施日期
newModelImplementationDate: 'New model implementation date', // 新车型实施日期
processState: 'Process state', // 流程状态
evaluationResult: 'Evaluation result', // 评估结果
responsibleDepartment: 'Responsible department', // 责任部门
evaluationResultHistory: 'Evaluation result history' // 评估结果历史
}
}
+12 -1
View File
@@ -18,6 +18,17 @@ module.exports = {
uninvolved: '不涉及',
regulationsList: '法规清单',
standardNumberStandardName: '标准号/标准名称',
transfer: '调取'
transfer: '调取',
standardNumber: '标准号',
standardName: '标准名称',
englishName: '英文名称',
standardState: '标准状态',
applicableVehicleType: '适用车型',
productionDate: '在产车实施日期',
newModelImplementationDate: '新车型实施日期',
processState: '流程状态',
evaluationResult: '评估结果',
responsibleDepartment: '责任部门',
evaluationResultHistory: '评估结果历史'
}
}
@@ -84,25 +84,32 @@
:scroll="{x: '100%'}"
@change="handleTableChange">
<!-- 标准编号-->
<template v-slot:standardNumber="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 标准名称-->
<template v-slot:standardName="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<template v-slot:operation="{text, record}">
<a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>
<a @click="evaluationResultHistory(record)">{{ $t('projectLibrary.vehicleItemLibrary.evaluationResultHistory') }}</a>
<a-divider type="vertical" />
<a-dropdown placement="bottomCenter">
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
<a-menu slot="overlay">
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
<a @click="operationClick(operation,record)">
<div class="operate-btn">
<!-- 编辑图标-->
<i class="iconfont icon-bianji operate-btn-icon" v-if="operation.text === $t('edit')" />
<!-- 删除图标-->
<i class="iconfont icon-shanchu_ operate-btn-icon" v-if="operation.text === $t('delete')" />
{{ operation.text }}
</div>
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
<a @click="handleDelete(record.id)">
<!--删除图标-->
<i class="iconfont icon-shanchu_ operate-btn-icon" />
{{ $t('delete') }}
</a>
</template>
</j-table>
@@ -116,6 +123,7 @@ import InternalDetailPage from '../../../components/InternalDetailPage.vue'
import { queryByIdVehicleItemLibrary } from '../../../api/projectLibraryApi.js'
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
import JTable from '../../../components/jero/JTable.vue'
import { TagsTypeEnums } from '../../../enums/commonEnums.js'
export default {
name: 'VehicleItemLibraryDetail',
@@ -161,7 +169,84 @@ export default {
]
}
],
riskOverviewData: [] // 风险项总览数据
riskOverviewData: [], // 风险项总览数据
// 法规清单表头
columns: [
// 标准号
{
dataIndex: 'projectSource_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumber'),
width: 150,
scopedSlots: { customRender: 'standardNumber' }
},
// 标准名称
{
dataIndex: 'projectName',
title: this.$t('projectLibrary.vehicleItemLibrary.standardName'),
width: 150,
scopedSlots: { customRender: 'standardName' }
},
// 英文名称
{
dataIndex: 'workNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.englishName'),
width: 150
},
// 标准状态
{
dataIndex: 'nameWorkNo',
title: this.$t('projectLibrary.vehicleItemLibrary.standardState'),
width: 100
},
// 适用车型
{
dataIndex: 'projectHealth_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.applicableVehicleType'),
width: 150
},
// 在产车实施日期
{
dataIndex: 'projectSource_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.productionDate'),
width: 150
},
// 新车型实施日期
{
dataIndex: 'projectName',
title: this.$t('projectLibrary.vehicleItemLibrary.newModelImplementationDate'),
width: 150
},
// 流程状态
{
dataIndex: 'workNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.processState'),
width: 120
},
// 评估结果
{
dataIndex: 'nameWorkNo',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
width: 120
},
// 责任部门
{
dataIndex: 'projectHealth_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
width: 120
},
// 操作
{
title: this.$t('operation'),
fixed: 'right',
width: 210,
scopedSlots: { customRender: 'operation' }
}
],
url: {
list: '',
delete: ''
},
dataSource: [{ id: 1 }]
}
},
computed: {
@@ -190,6 +275,25 @@ export default {
},
handleCopy () {
},
/**
* 跳转详情页
* @param id
*/
toDetailPage ({ id }) {
this.$openPageNewSheet({
path: '/standardRegulationLibrary/DomesticStandardDetail',
query: {
id,
type: TagsTypeEnums.DOMESTIC_LIST.value
}
})
},
/**
* 评估结果历史
*/
evaluationResultHistory () {
}
}
}
@@ -171,7 +171,7 @@ export default {
continueShare (ids) {
const params = {
id: this.$route.query.id, // 要分享的标准的id
userIds: ids // 分享给的用户的id
recipientId: ids // 分享给的用户的id
}
this.loading = true
shareDomesticStandard(params).then(res => {
@@ -247,7 +247,7 @@ export default {
},
yesValue: YesOrNoEnum.YES.value,
noValue: YesOrNoEnum.NO.value,
nowShareId: null, // 当前正在分享的数据的id
nowShareInfo: {}, // 当前正在分享的数据
selectedTreeKeys: [], // 选中的树节点
tableSlotField: ['standard_name', 'standard_number'] // 表格中需要插槽的字段
}
@@ -265,7 +265,7 @@ export default {
* 获取树数据
*/
initTreeData () {
getDomesticStandardTree().then(res => {
getDomesticStandardTree({ nodeName: this.treeInput }).then(res => {
if (res.success) {
const treeData = res.result || []
this.treeData = this.dealTreeData(treeData)
@@ -296,7 +296,7 @@ export default {
* 树节点查询
*/
handleTreeSearch () {
this.initTreeData()
},
/**
* 树节点鼠标移入
@@ -340,8 +340,11 @@ export default {
/**
* 分享
*/
handleShare ({ id }) {
this.nowShareId = id
handleShare ({ id, standard_number }) {
this.nowShareInfo = {
standardId: id,
standardNum: standard_number
}
this.$refs.userSelectModal.open()
},
/**
@@ -349,10 +352,9 @@ export default {
* @param ids
*/
continueShare (ids) {
const params = {
id: this.nowShareId, // 分享的标准的id
userIds: ids // 分享给的用户的id
}
const params = Object.assign(this.nowShareInfo, {
recipientId: ids // 分享给的用户的id
})
this.loading = true
shareDomesticStandard(params).then(res => {
if (res.success) {