[update] 市场法规清单联调

This commit is contained in:
lideqin
2024-07-01 14:56:38 +08:00
parent 2e4a421764
commit 00718d23ed
3 changed files with 110 additions and 38 deletions
@@ -13,9 +13,12 @@
<a-form-item :labelCol="labelCol" <a-form-item :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
:label="$t('standardRegulationLibrary.marketRegulationsList.countryRegion')"> :label="$t('standardRegulationLibrary.marketRegulationsList.countryRegion')">
<j-dict-select-tag v-decorator="['country', validatorRules.country]" <s-tree-select v-decorator="['country', validatorRules.country]"
dict-code="market_state" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.countryRegion')" /> style="width: 100%"
:tree-data="countryOptions"
:label-in-value="false"
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 清单编号 --> <!-- 清单编号 -->
@@ -197,6 +200,7 @@
<script> <script>
import InternalDetailPage from '@/components/InternalDetailPage' import InternalDetailPage from '@/components/InternalDetailPage'
import JTable from '@/components/jero/JTable' import JTable from '@/components/jero/JTable'
import STreeSelect from '@/components/STreeSelect'
import MarketRegulationsModal from './modules/MarketRegulationsModal' import MarketRegulationsModal from './modules/MarketRegulationsModal'
import StandardSelectionModal from '../../../components/selection/StandardSelectionModal' import StandardSelectionModal from '../../../components/selection/StandardSelectionModal'
import MarketRegulationsListSelectionModal from '../../../components/selection/MarketRegulationsListSelectionModal' import MarketRegulationsListSelectionModal from '../../../components/selection/MarketRegulationsListSelectionModal'
@@ -214,6 +218,7 @@ import { ACCESS_TOKEN, TENANT_ID } from '../../../store/mutation-types'
import { downloadFile } from '../../../api/manage' import { downloadFile } from '../../../api/manage'
import HistoryVersionModal from './modules/HistoryVersionModal' import HistoryVersionModal from './modules/HistoryVersionModal'
import store from '@/store' import store from '@/store'
import { getFormDictTreeList } from '../../../api/api'
const uidGenerator = () => { const uidGenerator = () => {
return '-' + parseInt(Math.random() * 10000 + 1, 10) return '-' + parseInt(Math.random() * 10000 + 1, 10)
@@ -230,7 +235,8 @@ export default {
InternalDetailPage, InternalDetailPage,
JTable, JTable,
MarketRegulationsModal, MarketRegulationsModal,
HistoryVersionModal HistoryVersionModal,
STreeSelect
}, },
computed: { computed: {
...mapGetters(['defaultHeight']), ...mapGetters(['defaultHeight']),
@@ -263,6 +269,7 @@ export default {
form: this.$form.createForm(this), form: this.$form.createForm(this),
model: {}, model: {},
queryParam: {}, queryParam: {},
countryOptions: [], // 国家下拉选择
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 6 } sm: { span: 6 }
@@ -481,11 +488,19 @@ export default {
} }
}, },
mounted () { mounted () {
this.getCountryOption()
if (this.$route.query.id) { if (this.$route.query.id) {
this.initData(this.$route.query.id) this.initData(this.$route.query.id)
} }
}, },
methods: { methods: {
getCountryOption () {
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
if (res.success) {
this.countryOptions = res.result
}
})
},
initData (id) { initData (id) {
this.loading = true this.loading = true
getMarketRegulationListById({ id }).then(res => { getMarketRegulationListById({ id }).then(res => {
@@ -772,15 +787,16 @@ export default {
this.form.validateFields((err, values) => { this.form.validateFields((err, values) => {
if (!err) { if (!err) {
this.loading = true this.loading = true
const param = Object.assign({}, values) const param = {}
param.manifest = Object.assign({}, values)
let func let func
if (this.model.id) { if (this.model.id) {
param.id = this.model.id param.manifest.id = this.model.id
func = marketRegulationListEdit func = marketRegulationListEdit
} else { } else {
func = marketRegulationListAdd func = marketRegulationListAdd
} }
param.dataList = this.dataList param.lists = this.dataList
func(param).then(res => { func(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -8,28 +8,35 @@
<!-- 清单编号 --> <!-- 清单编号 -->
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listNumber')"> <a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listNumber')">
<j-input <a-input
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumber')" :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumber')"
v-model="queryParam.manifestNo"></j-input> v-model="queryParam.manifestNo"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 清单名称 --> <!-- 清单名称 -->
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listName')"> <a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listName')">
<j-input <a-input
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listName')" :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listName')"
v-model="queryParam.mainfestName"></j-input> v-model="queryParam.manifestName"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 国家/地区 --> <!-- 国家/地区 -->
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.countryRegion')"> <a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.countryRegion')">
<j-dict-select-tag <a-tree-select
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.countryRegion')" tree-node-filter-prop="title"
v-model="queryParam.country" v-model="queryParam.country"
dict-code="market_state"></j-dict-select-tag> :maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:tree-data="countryOptions"
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')"
show-search
allowClear
:filterTreeNode="filterTreeOption"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -47,9 +54,9 @@
<!-- 作者 --> <!-- 作者 -->
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.author')"> <a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.author')">
<j-input <a-input
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.author')" :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.author')"
v-model="queryParam.author"></j-input> v-model="queryParam.author"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
</template> </template>
@@ -59,7 +66,7 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }} {{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a> </a>
<a-button type="primary" @click="searchQuery" icon="search">{{ $t('query') }}</a-button> <a-button type="primary" @click="searchQuery" icon="search" v-has="'marketStandard:search'">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button> <a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div> </div>
@@ -94,6 +101,8 @@
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:operationList="operationList"
@operationClick="operationClick"
@change="handleTableChange"> @change="handleTableChange">
<!-- 清单编号清单名称 --> <!-- 清单编号清单名称 -->
@@ -116,6 +125,7 @@ import JTable from '@/components/jero/JTable'
import JDictSelectTag from '@/components/dict/JDictSelectTag' import JDictSelectTag from '@/components/dict/JDictSelectTag'
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import { ListState } from '../../../enums/commonEnums' import { ListState } from '../../../enums/commonEnums'
import { getFormDictTreeList } from '../../../api/api'
export default { export default {
name: 'MarketRegulationsList', name: 'MarketRegulationsList',
@@ -123,12 +133,13 @@ export default {
mixins: [JeroListMixin], mixins: [JeroListMixin],
data () { data () {
return { return {
countryOptions: [], // 国家下拉选择
columns: [ columns: [
{ // 国家/地区 { // 国家/地区
title: this.$t('standardRegulationLibrary.marketRegulationsList.countryRegion'), title: this.$t('standardRegulationLibrary.marketRegulationsList.countryRegion'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'country', dataIndex: 'country_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 清单编号 { // 清单编号
@@ -142,14 +153,14 @@ export default {
title: this.$t('standardRegulationLibrary.marketRegulationsList.listName'), title: this.$t('standardRegulationLibrary.marketRegulationsList.listName'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'mainfestName', dataIndex: 'manifestName',
scopedSlots: { customRender: 'toDetail' } scopedSlots: { customRender: 'toDetail' }
}, },
{ // 驾驶位置 { // 驾驶位置
title: this.$t('standardRegulationLibrary.marketRegulationsList.drivingPosition'), title: this.$t('standardRegulationLibrary.marketRegulationsList.drivingPosition'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'drivePosition', dataIndex: 'drivePosition_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 清单版本 { // 清单版本
@@ -170,14 +181,14 @@ export default {
title: this.$t('standardRegulationLibrary.marketRegulationsList.author'), title: this.$t('standardRegulationLibrary.marketRegulationsList.author'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'author', dataIndex: 'author_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 清单状态 { // 清单状态
title: this.$t('standardRegulationLibrary.marketRegulationsList.listState'), title: this.$t('standardRegulationLibrary.marketRegulationsList.listState'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'manifestStatus', dataIndex: 'manifestStatus_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ {
@@ -213,13 +224,27 @@ export default {
} }
], ],
url: { url: {
list: '', list: '/laws/marketStandard/page',
deleteBatch: '', deleteBatch: '',
delete: '' delete: ''
} }
} }
}, },
mounted () {
this.getCountryOption()
},
methods: { methods: {
getCountryOption () {
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
if (res.success) {
this.countryOptions = res.result
}
})
},
filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
// 新增 // 新增
handleAdd () { handleAdd () {
this.$router.push({ this.$router.push({
@@ -42,23 +42,29 @@
<!-- 新生产车实施日期 --> <!-- 新生产车实施日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')">
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')" <j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')"
field-name="newProductImplDate"
v-decorator.trim="[ 'newProductImplDate', validatorRules.newProductImplDate ]" /> v-decorator.trim="[ 'newProductImplDate', validatorRules.newProductImplDate ]" />
</a-form-item> </a-form-item>
<!-- 新认证车实施日期 --> <!-- 新认证车实施日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')">
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')" <j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')"
field-name="newAuthImplDate"
v-decorator.trim="[ 'newAuthImplDate', validatorRules.newAuthImplDate ]" /> v-decorator.trim="[ 'newAuthImplDate', validatorRules.newAuthImplDate ]" />
</a-form-item> </a-form-item>
<!-- 注册日期 --> <!-- 注册日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.dateOfRegistration')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.dateOfRegistration')">
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.dateOfRegistration')" <j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.dateOfRegistration')"
field-name="registrationDate"
v-decorator.trim="[ 'registrationDate', validatorRules.registrationDate ]" /> v-decorator.trim="[ 'registrationDate', validatorRules.registrationDate ]" />
</a-form-item> </a-form-item>
<!-- 适用国家/地区 --> <!-- 适用国家/地区 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableCountryRegion')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableCountryRegion')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.applicableCountryRegion')" <s-tree-select
dict-code="market_state" v-decorator.trim="[ 'applicableCountryRegion', validatorRules.applicableCountryRegion ]"
v-decorator.trim="[ 'applicableCountryRegion', validatorRules.applicableCountryRegion ]" /> :tree-data="countryOptions"
tree-checkable
treeCheckStrictly
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketListField.applicableCountryRegion')" />
</a-form-item> </a-form-item>
<!-- 认证对象 --> <!-- 认证对象 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.authenticationObject')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.authenticationObject')">
@@ -80,9 +86,9 @@
</a-form-item> </a-form-item>
<!-- 主控部门专业模块 --> <!-- 主控部门专业模块 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')" <j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')"
dict-code="master_control_department_professional_module" dict-code="professional_module"
v-decorator.trim="[ 'mainDeptProfMode', validatorRules.mainDeptProfMode ]" /> v-decorator.trim="[ 'mainDeptProfMode', validatorRules.mainDeptProfMode ]" />
</a-form-item> </a-form-item>
<!-- 关联部门 --> <!-- 关联部门 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.relatedDepartment')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.relatedDepartment')">
@@ -92,9 +98,9 @@
</a-form-item> </a-form-item>
<!-- 关联部门专业模块 --> <!-- 关联部门专业模块 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')" <j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')"
dict-code="master_control_department_professional_module" dict-code="professional_module"
v-decorator.trim="[ 'associateDeptProfMode', validatorRules.associateDeptProfMode ]" /> v-decorator.trim="[ 'associateDeptProfMode', validatorRules.associateDeptProfMode ]" />
</a-form-item> </a-form-item>
<!-- 适用车型 --> <!-- 适用车型 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableVehicleType')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableVehicleType')">
@@ -142,12 +148,14 @@
<script> <script>
import StandardSelection from '@/components/selection/StandardSelection' import StandardSelection from '@/components/selection/StandardSelection'
import JMultipleDatePicker from '../../../../components/JMultipleDatePicker' import JMultipleDatePicker from '../../../../components/JMultipleDatePicker'
import STreeSelect from '@/components/STreeSelect'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { getForeignStandardDocumentInfo } from '../../../../api/standardRegulationLibraryApi' import { getForeignStandardDocumentInfo } from '../../../../api/standardRegulationLibraryApi'
import { getFormDictTreeList } from '../../../../api/api'
export default { export default {
name: 'MarketRegulationsModal', name: 'MarketRegulationsModal',
components: { JMultipleDatePicker, StandardSelection }, components: { JMultipleDatePicker, StandardSelection, STreeSelect },
data () { data () {
return { return {
title: this.$t('newlyAdded'), title: this.$t('newlyAdded'),
@@ -156,6 +164,7 @@ export default {
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this),
model: {}, model: {},
countryOptions: [], // 适用国家/地区下拉框
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 6 } sm: { span: 6 }
@@ -256,6 +265,9 @@ export default {
} }
} }
}, },
mounted () {
this.getCountryOption()
},
methods: { methods: {
add () { add () {
this.edit({}) this.edit({})
@@ -271,20 +283,39 @@ export default {
'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType')) 'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType'))
}) })
}, },
getCountryOption () {
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
if (res.success) {
this.countryOptions = res.result
}
})
},
// 选择标准改变 // 选择标准改变
selectStandardChange (value) { selectStandardChange (value) {
this.loading = true this.loading = true
// 企标名称
this.formInline.standardName = value[0].standardName
// 根据返回的id查询企标数据 // 根据返回的id查询企标数据
getForeignStandardDocumentInfo({ id: value[0].id, type: '2' }).then(res => { getForeignStandardDocumentInfo({ id: value[0].id, type: '2' }).then(res => {
if (res.success) { if (res.success) {
const result = res.result const result = res.result
result.standardName = result.standard_name // 标准名称
result.standardEnglishName = result.standard_english_name // 标准英文名称
result.stanardClass = result.standard_class // 标准类型
result.newProductImplDate = result.new_product_impl_date // 新生产车实施日期
result.newAuthImplDate = result.new_auth_impl_date // 新认证车实施日期
result.registrationDate = result.registration_date // 注册日期
result.applicableCountryRegion = result.applicable_market ? (result.applicable_market.split(',').map(item => {
return { value: item }
})) : [] // 适用国家/地区
result.mainDept = result.main_dept // 主控部门
result.mainDeptProfMode = result.main_dept_prof_mode || undefined // 主控部门专业模块
result.associateDept = result.associate_dept // 关联部门
result.associateDeptProfMode = result.associate_dept_prof_mode || undefined // 关联部门专业模块
result.applicableVehicle = result.applicable_vehicle // 适用车型
result.dynamicType = result.dynamic_type // 动力类型
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(result, 'standardNumber', 'standardName', 'standardEnglishName', this.form.setFieldsValue(pick(result, 'standardName', 'standardEnglishName',
'stanardClass', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'applicableCountryRegion', 'stanardClass', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'applicableCountryRegion',
'authenticationObject', 'certifyTheDeliverables', 'mainDept', 'mainDeptProfMode', 'associateDept', 'mainDept', 'mainDeptProfMode', 'associateDept', 'associateDeptProfMode', 'applicableVehicle', 'dynamicType'))
'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType'))
}) })
} }
}).finally(() => { }).finally(() => {