update 国内标准-配置、移除标准

This commit is contained in:
赵霄
2023-09-14 09:56:48 +08:00
parent e8953b848e
commit 96e73828ad
9 changed files with 381 additions and 25 deletions
+3
View File
@@ -30,6 +30,8 @@ const getDomesticStandardTree = (params) => getAction('/laws/standard/lawsTreeNo
const addDomesticStandard = (params) => postAction('/laws/standard/domestic/commonAdd', params)
// 国内标准-编辑标准
const editDomesticStandard = (params) => postAction('/laws/standard/domestic/commonEdit', params)
// 国内标准-配置标准-过滤没有选中体系的数据
const getDomesticStandardNoSystem = (params) => getAction('/laws/standard/common/getStandardRightBox', params)
// 海外标准-获取查询条件
const getOverseasStandardSearchForm = (params) => getAction('/laws/standard/overseas/getQueryCondition', params)
@@ -57,6 +59,7 @@ export {
getDomesticStandardTree,
addDomesticStandard,
editDomesticStandard,
getDomesticStandardNoSystem,
// 海外标准
getOverseasStandardSearchForm,
+5 -1
View File
@@ -481,7 +481,11 @@ module.exports = {
standardSelect: {
standardSelection: 'Standard Selection',
source: 'Source',
standardNumOrName: 'Standard number/Standard name'
standardNumOrName: 'Standard number/Standard name',
standardNumber: 'Standard number',
standardName: 'Standard name',
releaseDate: 'Release date',
textState: 'Text state'
},
// 用户/组织结构选择器
userOrOrganSelect: {
+5 -1
View File
@@ -481,7 +481,11 @@ module.exports = {
standardSelect: {
standardSelection: '标准选择',
source: '来源',
standardNumOrName: '标准号/标准名称'
standardNumOrName: '标准号/标准名称',
standardNumber: '标准号',
standardName: '标准名称',
releaseDate: '发布日期',
textState: '文本状态'
},
// 用户/组织结构选择器
userOrOrganSelect: {
@@ -0,0 +1,87 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="true"
@close="onClose"
:visible="visible"
:maskClosable="false"
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
<a-spin :spinning="confirmLoading">
</a-spin>
</div>
</a-drawer>
</template>
<script>
export default {
name: 'VehicleProjectSelectionDrawer',
data () {
return {
visible: false,
title: this.$t('projectLibrary.selectProject'),
width: 800,
// 存储表单的数据
form: {},
isEdit: false,
confirmLoading: false,
columns: [
// 项目来源
{
dataIndex: 'projectSource_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.projectSource'),
width: 250
},
// 项目名称
{
dataIndex: 'projectName',
title: this.$t('projectLibrary.projectName'),
sorter: true,
width: 250,
scopedSlots: { customRender: 'projectName' }
},
// 工作令编号
{
dataIndex: 'workNumber',
title: this.$t('projectLibrary.workOrderNumber'),
sorter: true,
width: 250
},
// 项目负责人
{
dataIndex: 'nameWorkNo',
title: this.$t('projectLibrary.vehicleItemLibrary.projectLeader'),
width: 250
},
// 项目健康状态
{
dataIndex: 'projectHealth_dictText',
title: this.$t('projectLibrary.projectHealthStatus'),
width: 250
},
// 操作
{
title: this.$t('operation'),
fixed: 'right',
width: 150,
scopedSlots: { customRender: 'operation' }
}
],
}
},
methods: {
open () {
this.visible = true
},
onClose () {
this.visible = false
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,16 @@
<template>
<internal-detail-page></internal-detail-page>
</template>
<script>
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
export default {
name: 'EvaluationResultHistoryPage',
components: { InternalDetailPage }
}
</script>
<style scoped>
</style>
@@ -159,7 +159,7 @@ export default {
{
title: this.$t('operation'),
fixed: 'right',
width: 200,
width: 150,
scopedSlots: { customRender: 'operation' }
}
],
@@ -40,11 +40,18 @@
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<!--标准号/标准名称-->
<!--标准-->
<a-col :md="6" :sm="12">
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')">
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"
v-model="queryParam.projectName"></j-input>
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumber')">
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumber')"
v-model="queryParam.standardName"></j-input>
</a-form-item>
</a-col>
<!--标准名称-->
<a-col :md="6" :sm="12">
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardName')">
<j-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardName')"
v-model="queryParam.standardNumber"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
@@ -114,6 +121,9 @@
</j-table>
</div>
<!--选择标准-->
<standard-selection-modal ref="standardSelectionModal"/>
</internal-detail-page>
</template>
@@ -124,10 +134,11 @@ 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'
import StandardSelectionModal from '../../../components/selection/StandardSelectionModal.vue'
export default {
name: 'VehicleItemLibraryDetail',
components: { JTable, InternalDetailPage },
components: { JTable, InternalDetailPage, StandardSelectionModal },
mixins: [JeroListMixin],
data () {
return {
@@ -174,63 +185,63 @@ export default {
columns: [
// 标准号
{
dataIndex: 'projectSource_dictText',
dataIndex: 'standardNumber',
title: this.$t('projectLibrary.vehicleItemLibrary.standardNumber'),
width: 150,
scopedSlots: { customRender: 'standardNumber' }
},
// 标准名称
{
dataIndex: 'projectName',
dataIndex: 'standardName',
title: this.$t('projectLibrary.vehicleItemLibrary.standardName'),
width: 150,
scopedSlots: { customRender: 'standardName' }
},
// 英文名称
{
dataIndex: 'workNumber',
dataIndex: 'standardEnglishName',
title: this.$t('projectLibrary.vehicleItemLibrary.englishName'),
width: 150
},
// 标准状态
{
dataIndex: 'nameWorkNo',
dataIndex: 'standardState_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.standardState'),
width: 100
},
// 适用车型
{
dataIndex: 'projectHealth_dictText',
dataIndex: 'applicableVehicle',
title: this.$t('projectLibrary.vehicleItemLibrary.applicableVehicleType'),
width: 150
},
// 在产车实施日期
{
dataIndex: 'projectSource_dictText',
dataIndex: 'onTheProductionDate',
title: this.$t('projectLibrary.vehicleItemLibrary.productionDate'),
width: 150
},
// 新车型实施日期
{
dataIndex: 'projectName',
dataIndex: 'newModelImplementationDate',
title: this.$t('projectLibrary.vehicleItemLibrary.newModelImplementationDate'),
width: 150
},
// 流程状态
{
dataIndex: 'workNumber',
dataIndex: 'processStatus_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.processState'),
width: 120
},
// 评估结果
{
dataIndex: 'nameWorkNo',
dataIndex: 'evaluationResults_dictText',
title: this.$t('projectLibrary.vehicleItemLibrary.evaluationResult'),
width: 120
},
// 责任部门
{
dataIndex: 'projectHealth_dictText',
dataIndex: 'responsibleDepartment',
title: this.$t('projectLibrary.vehicleItemLibrary.responsibleDepartment'),
width: 120
},
@@ -243,10 +254,12 @@ export default {
}
],
url: {
list: '',
delete: ''
list: '/projectLibrary/lawsAssess/page',
delete: '/projectLibrary/lawsAssess/delete'
},
dataSource: [{ id: 1 }]
filters: {
projectId: this.$route.query.id
}
}
},
computed: {
@@ -270,8 +283,11 @@ export default {
this.loading = false
})
},
/**
* 调取
*/
handleTransfer () {
this.$refs.standardSelectionModal.open()
},
handleCopy () {
@@ -175,7 +175,7 @@
<!-- 树新增编辑-->
<domestic-system-tree-modal ref="treeModal" @ok="modalFormOk" />
<!-- 配置标准-->
<standard-selection-modal ref="standardSelectionModal" @change="continueConfigStandard" />
<selection-domestic-standard-drawer ref="standardSelectionModal" :node-code="selectedTreeNodeCodes[0]" @change="continueConfigStandard" />
</a-card>
</template>
@@ -199,11 +199,11 @@ import {
import { StandardSystemTreeNodeType, TagsTypeEnums, YesOrNoEnum } from '../../../enums/commonEnums'
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
import DomesticSystemTreeModal from './modules/DomesticSystemTreeModal.vue'
import StandardSelectionModal from '../../../components/selection/StandardSelectionModal.vue'
import SelectionDomesticStandardDrawer from './modules/SelectionDomesticStandardDrawer.vue'
export default {
name: 'DomesticStandardList',
components: { Search, JTable, DomesticStandardModal, UserSelectModal, DomesticSystemTreeModal, StandardSelectionModal },
components: { Search, JTable, DomesticStandardModal, UserSelectModal, DomesticSystemTreeModal, SelectionDomesticStandardDrawer },
mixins: [ConfigurableTableMixin],
data () {
return {
@@ -0,0 +1,226 @@
<template>
<a-drawer
:title="$t('standardSelect.standardSelection')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :sm="8">
<a-form-item :label="$t('standardSelect.standardNumOrName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('standardSelect.standardNumOrName')"
v-model="queryParam.standardNumberOrName"></a-input>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 41px;margin-bottom: 20px" class="table-page-search-submitButtons">
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{ $t('reset') }}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
rowKey="serial_number"
:scroll="{x: 900}"
:data-source="dataList"
:pagination="ipagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:loading="loading">
<!-- 标准编号标准名称跳转详情-->
<template v-slot:detail="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 slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
</a-table>
</div>
<div class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getDomesticStandardNoSystem } from '../../../../api/standardRegulationLibraryApi.js'
import { TagsTypeEnums } from '../../../../enums/commonEnums.js'
export default {
name: 'SelectionDomesticStandardDrawer',
props: {
// 选中节点code
nodeCode: {
type: String,
required: false,
default: null
},
query: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
data () {
return {
visible: false,
confirmLoading: false,
labelCol: {
sm: 8
},
wrapperCol: {
sm: 14
},
selectedRowKeys: [],
selectedRowList: [],
loading: false,
queryParam: {},
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('standardSelect.standardNumber'),
dataIndex: 'standardNumber',
align: 'center',
width: 150,
scopedSlots: { customRender: 'detail' }
},
{
title: this.$t('standardSelect.standardName'),
dataIndex: 'standardName',
align: 'center',
width: 150,
scopedSlots: { customRender: 'detail' }
},
{
title: this.$t('standardSelect.releaseDate'),
dataIndex: 'releaseDate',
align: 'center',
width: 120,
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('standardSelect.textState'),
dataIndex: 'standardState_dictText',
align: 'center',
width: 120,
scopedSlots: { customRender: 'text' }
}
],
dataList: [],
url: {
searchList: 'document/bussDocumentLibraryEO/queryCondition' // 搜索字段
}
}
},
methods: {
open () {
this.visible = true
this.queryParam = {}
this.replacePage()
},
// 获取表格数据
replacePage () {
const query = {
...this.queryParam,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
nodeCode: this.nodeCode,
source: '1'
}
this.selectedRowKeys = []
this.loading = true
getDomesticStandardNoSystem(query).then((res) => {
if (res.success) {
this.dataList = res.result.records
this.ipagination.total = res.result.total
this.selectedRowKeys = this.standard[this.query.db_field_name] ? this.standard[this.query.db_field_name].split(',') : []
} else {
this.dataList = []
}
}).finally(() => {
this.loading = false
})
},
searchQuery () {
this.replacePage()
},
searchReset () {
this.queryParam = {}
this.replacePage()
},
// 表格选择改变
onSelectChange (value, row) {
this.selectedRowKeys = value
this.selectedRowList = row
},
handleCancel () {
this.visible = false
},
handleSubmit () {
const serialNumber = []
const replaceStandardId = []
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
// let content = JSON.parse(JSON.stringify(this.selectedRowList))
this.selectedRowList.forEach(res => {
serialNumber.push(res.serial_number)
replaceStandardId.push(res.id)
})
this.$emit('input', serialNumber.join(','))
this.$emit('change', this.query.dbFieldName, replaceStandardId.join(','))
// this.$emit('changecontent', this.content)
this.visible = false
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
/**
* 跳转详情页
* @param id
*/
toDetailPage ({ id }) {
this.$openPageNewSheet({
path: '/standardRegulationLibrary/DomesticStandardDetail',
query: {
id,
type: TagsTypeEnums.DOMESTIC_LIST.value
}
})
}
}
}
</script>
<style scoped>
</style>