[update] 市场法规清单,清单列表增加排序字段,增加上移下移按钮;外标详情页内容简介整行显示
This commit is contained in:
@@ -156,6 +156,8 @@ const marketRegulationDetailCopy = (params) => postAction('/laws/marketStandardD
|
||||
const marketRegulationDetailAdd = (params) => postAction('/laws/marketStandardDetail/add', params)
|
||||
// 市场法规清单-清单列表-编辑
|
||||
const marketRegulationDetailEdit = (params) => postAction('/laws/marketStandardDetail/edit', params)
|
||||
// 市场法规清单-清单列表-上移、下移
|
||||
const marketRegulationDetailMove = (params) => postAction('/laws/marketStandardDetail/move', params)
|
||||
// 市场法规清单-发布-看该清单是否可以发布
|
||||
const marketRegulationDetailPublish = (params) => postAction('/laws/marketStandard/publish', params)
|
||||
|
||||
@@ -248,5 +250,6 @@ export {
|
||||
marketRegulationDetailCopy,
|
||||
marketRegulationDetailAdd,
|
||||
marketRegulationDetailEdit,
|
||||
marketRegulationDetailMove,
|
||||
marketRegulationDetailPublish
|
||||
}
|
||||
|
||||
@@ -256,6 +256,8 @@ module.exports = {
|
||||
updatePerson: 'Regenerator',
|
||||
updateTime: 'Update Time',
|
||||
handlingSuggestions: 'Handling Suggestions',
|
||||
upMove: 'Move Up',
|
||||
downMove: 'Move Down',
|
||||
// 标准字段
|
||||
standardField: {
|
||||
standardEnglishName: 'Regulation English Name',
|
||||
|
||||
@@ -256,6 +256,8 @@ module.exports = {
|
||||
updatePerson: '更新人',
|
||||
updateTime: '更新时间',
|
||||
handlingSuggestions: '处理意见',
|
||||
upMove: '上移',
|
||||
downMove: '下移',
|
||||
// 标准字段
|
||||
standardField: {
|
||||
standardEnglishName: '标准英文名称',
|
||||
|
||||
@@ -37,7 +37,10 @@
|
||||
<template v-if="operSpecialJudgeField">
|
||||
<template v-if="operSpecialJudge(record).length > operateMaxNum + 1">
|
||||
<!-- 需要更多按钮 -->
|
||||
<a :class="operSpecialJudge(record)[0].text === $t('delete') ? 'operate-del-btn' : ''" @click="operationClick(operSpecialJudge(record)[0],record)">{{ operSpecialJudge(record)[0].text }}</a>
|
||||
<template v-for="(operation, index) in operSpecialJudge(record).slice(0, operateMaxNum)">
|
||||
<a :key="index" :class="operation.text === $t('delete') ? 'operate-del-btn' : ''" @click="operationClick(operation,record)">{{ operation.text }}</a>
|
||||
<a-divider v-if="index + 1 < operSpecialJudge(record).slice(0, operateMaxNum).length" type="vertical" />
|
||||
</template>
|
||||
<template v-if="operSpecialJudge(record).length > operateMaxNum">
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown placement="bottomCenter">
|
||||
@@ -66,7 +69,10 @@
|
||||
<!-- 没有特殊判断,直接渲染operationList -->
|
||||
<!-- 需要更多按钮的情况 -->
|
||||
<template v-if="getLineOperationList(record).length > operateMaxNum + 1">
|
||||
<a :class="getLineOperationList(record)[0].text === $t('delete') ? 'operate-del-btn' : ''" @click="operationClick(getLineOperationList(record)[0],record)">{{ getLineOperationList(record)[0].text }}</a>
|
||||
<template v-for="(operation, index) in operSpecialJudge(record).slice(0, operateMaxNum)">
|
||||
<a :key="index" :class="operation.text === $t('delete') ? 'operate-del-btn' : ''" @click="operationClick(operation,record)">{{ operation.text }}</a>
|
||||
<a-divider v-if="index + 1 < operSpecialJudge(record).slice(0, operateMaxNum).length" type="vertical" />
|
||||
</template>
|
||||
<template v-if="getLineOperationList(record).length > operateMaxNum">
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown placement="bottomCenter">
|
||||
|
||||
+8
-2
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-page-part-form" v-if="part !== DisplayAreaManagement.PROCESS_DOCUMENTATION.text && part !== DisplayAreaManagement.PROCESS_DOCUMENTATION.textEn">
|
||||
<div class="detail-page-part-form-item" v-for="formItem in form[part]" :key="formItem.id">
|
||||
<div class="detail-page-part-form-item" :class="needFullLineDisplayField.includes(formItem.dbFieldName) ? 'all-line-show' : ''" v-for="formItem in form[part]" :key="formItem.id">
|
||||
<label>{{ formItem.dbFieldTxt }}</label>
|
||||
<!--标准需要跳转,是标准字段且有内容的情况下在这处理-->
|
||||
<template v-if="standardFields.includes(formItem.dbFieldName) && !!detailData[formItem.dbFieldName]">
|
||||
@@ -232,7 +232,9 @@ export default {
|
||||
// 需要双语切换翻译的属性类型
|
||||
needEnNameFieldType: [FieldType.OPTION_SINGLE.value, FieldType.OPTION_MORE.value, FieldType.TREE.value, FieldType.TREE_SINGLE.value],
|
||||
// 是双语切换翻译的属性,但是不翻译的字段
|
||||
needEnNameTypeNotUseField: ['standard_system']
|
||||
needEnNameTypeNotUseField: ['standard_system'],
|
||||
// 需要整行显示的字段
|
||||
needFullLineDisplayField: ['brief_introduction_of_the_content']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -546,6 +548,10 @@ export default {
|
||||
color: #D52C26;
|
||||
}
|
||||
|
||||
.all-line-show {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
//.icon-star1 {
|
||||
// color: rgba(243, 129, 65);
|
||||
//}
|
||||
|
||||
+57
-8
@@ -166,6 +166,9 @@
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
:operateMaxNum="2"
|
||||
:operationList="operationList"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 标准编号、标准名称 -->
|
||||
@@ -176,12 +179,6 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-slot:action="{text, record}">
|
||||
<a @click="handleEdit(record)" v-has="'marketStandard:detail:operate'">{{ $t('edit') }}</a>
|
||||
<a-divider type="vertical" v-has="'marketStandard:detail:operate'" />
|
||||
<a @click="handleDelete(record.id)" class="operate-del-btn" v-has="'marketStandard:detail:operate'">{{ $t('delete') }}</a>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
<!-- table区域-end -->
|
||||
@@ -213,13 +210,14 @@ import {
|
||||
getForeignStandardDocumentInfo,
|
||||
getMarketRegulationListById,
|
||||
marketRegulationDetailCopy,
|
||||
marketRegulationDetailMove,
|
||||
marketRegulationDetailTransfer,
|
||||
marketRegulationGetListNumber,
|
||||
marketRegulationListAdd,
|
||||
marketRegulationListEdit
|
||||
} from '../../../api/standardRegulationLibraryApi'
|
||||
import pick from 'lodash.pick'
|
||||
import { StandardSource, SecurityClass } from '../../../enums/commonEnums'
|
||||
import { StandardSource, SecurityClass, ListState } from '../../../enums/commonEnums'
|
||||
import { mapGetters } from 'vuex'
|
||||
import HistoryVersionModal from './modules/HistoryVersionModal'
|
||||
import { getFormDictTreeList } from '../../../api/api'
|
||||
@@ -282,6 +280,11 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 20 }
|
||||
},
|
||||
/* 排序参数 */
|
||||
isorter: {
|
||||
column: 'orderNo,createTime',
|
||||
order: 'asc,desc'
|
||||
},
|
||||
validatorRules: {
|
||||
// 适用市场
|
||||
country: {
|
||||
@@ -472,10 +475,36 @@ export default {
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 170
|
||||
width: 220
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
operationList: [
|
||||
// 上移
|
||||
{
|
||||
text: this.$t('upMove'),
|
||||
clickEvent: 'handleUp',
|
||||
has: 'marketStandard:detail:operate'
|
||||
},
|
||||
// 下移
|
||||
{
|
||||
text: this.$t('downMove'),
|
||||
clickEvent: 'handleDown',
|
||||
has: 'marketStandard:detail:operate'
|
||||
},
|
||||
// 编辑
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'marketStandard:detail:operate'
|
||||
},
|
||||
// 删除
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'handleDelete',
|
||||
has: 'marketStandard:detail:operate'
|
||||
}
|
||||
],
|
||||
showList: false, // 是否展示清单
|
||||
url: {
|
||||
list: '/laws/marketStandardDetail/page',
|
||||
@@ -711,6 +740,26 @@ export default {
|
||||
id: record.standardId
|
||||
}
|
||||
})
|
||||
},
|
||||
// 上移
|
||||
handleUp (record) {
|
||||
this.loading = true
|
||||
const param = {}
|
||||
param.id = this.model.id
|
||||
param.manifestId = record.id
|
||||
param.moveFlag = 'up'
|
||||
marketRegulationDetailMove(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 下移
|
||||
handleDown () {
|
||||
|
||||
},
|
||||
// 编辑
|
||||
handleEdit (record) {
|
||||
|
||||
+16
-1
@@ -143,6 +143,13 @@
|
||||
:maxLength="500"
|
||||
v-decorator.trim="[ 'remark', validatorRules.remark ]" />
|
||||
</a-form-item>
|
||||
<!-- 排序 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('sort')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('sort')"
|
||||
:maxLength="50"
|
||||
@change="e => e.target.value = e.target.value.replace(/[^0-9.]/g, '')"
|
||||
v-decorator.trim="[ 'orderNo', validatorRules.orderNo ]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</div>
|
||||
@@ -276,6 +283,14 @@ export default {
|
||||
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.dynamicType')
|
||||
}],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 排序
|
||||
orderNo: {
|
||||
rules: [{
|
||||
required: false,
|
||||
message: this.$t('pleaseEnter') + this.$t('sort')
|
||||
}],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
manifestId: '' // 基础信息清单id
|
||||
@@ -305,7 +320,7 @@ export default {
|
||||
this.form.setFieldsValue(pick(this.model, 'standardNumber', 'standardName', 'standardEnglishName',
|
||||
'type', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'country',
|
||||
'authenticationObject', 'certifyTheDeliverables', 'mainDept', 'mainDeptProfMode', 'associateDept',
|
||||
'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType', 'remark'))
|
||||
'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType', 'remark', 'orderNo'))
|
||||
})
|
||||
},
|
||||
getCountryOption () {
|
||||
|
||||
Reference in New Issue
Block a user