refactor(core): 移除ElementUI直接引入并统一字段名规范
- 移除ElementUI的直接import,改为通过plugins/element/index统一管理 - 移除locale配置和相关CSS引入 - 统一企业列表组件中的字段名从驼峰命名改为小写加下划线格式 - 修复EntList组件中row-key和formatter的字段引用错误 - 更新文档和办理页面中的实体名称字段映射 - 修复包含列表中的字段名不一致问题 fix(table): 统一数据字段名格式 - 将pripId统一改为pripid - 将uniscId统一改为uniscid - 将entName统一改为entname - 修复localadm字段的显示逻辑 - 更新API响应数据的解构方式
This commit is contained in:
parent
c0362d6cf4
commit
f322ebaa19
14
src/main.js
14
src/main.js
|
|
@ -3,11 +3,7 @@ import Vue from 'vue'
|
||||||
|
|
||||||
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
||||||
|
|
||||||
import ElementUI from 'element-ui'
|
|
||||||
import 'element-ui/lib/theme-chalk/index.css'
|
|
||||||
import locale from 'element-ui/lib/locale/lang/zh-CN' // 中文
|
|
||||||
import './assets/font/iconfont.css'
|
import './assets/font/iconfont.css'
|
||||||
import '@/styles/element-variables.scss'
|
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
import './utils/rem'
|
import './utils/rem'
|
||||||
|
|
@ -26,6 +22,7 @@ import { parseTime } from '@/utils/index.js'
|
||||||
|
|
||||||
import hevueImgPreview from 'hevue-img-preview'
|
import hevueImgPreview from 'hevue-img-preview'
|
||||||
import '@/plugins/EasyComponent/index'
|
import '@/plugins/EasyComponent/index'
|
||||||
|
import '@/plugins/element/index'
|
||||||
Vue.use(hevueImgPreview)
|
Vue.use(hevueImgPreview)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -43,8 +40,6 @@ Vue.use(hevueImgPreview)
|
||||||
// }
|
// }
|
||||||
Vue.prototype.$echarts = echarts
|
Vue.prototype.$echarts = echarts
|
||||||
Vue.prototype.$moment = moment
|
Vue.prototype.$moment = moment
|
||||||
// set ElementUI lang to EN
|
|
||||||
Vue.use(ElementUI, { locale })
|
|
||||||
// 工具类
|
// 工具类
|
||||||
Vue.prototype.$util = util
|
Vue.prototype.$util = util
|
||||||
Vue.prototype.$utils = utils
|
Vue.prototype.$utils = utils
|
||||||
|
|
@ -65,13 +60,6 @@ new Vue({
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
})
|
})
|
||||||
|
|
||||||
const confirm = Vue.prototype.$confirm
|
|
||||||
Vue.prototype.$confirm = function(message, title, options = {}) {
|
|
||||||
return confirm(message, title, {
|
|
||||||
type: 'info',
|
|
||||||
...options
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 离开删除
|
// 离开删除
|
||||||
window.onbeforeunload = function() {
|
window.onbeforeunload = function() {
|
||||||
sessionStorage.removeItem('ssoToken')
|
sessionStorage.removeItem('ssoToken')
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
:table-prop="tableProp"
|
:table-prop="tableProp"
|
||||||
:fields="fields"
|
:fields="fields"
|
||||||
:show-search-form="true"
|
:show-search-form="true"
|
||||||
row-key="pripId"
|
row-key="pripid"
|
||||||
:search-form-prop="searchFormProp"
|
:search-form-prop="searchFormProp"
|
||||||
:search-loader="searchLoader"
|
:search-loader="searchLoader"
|
||||||
:selected.sync="selected"
|
:selected.sync="selected"
|
||||||
|
|
@ -55,7 +55,7 @@ export default {
|
||||||
tableProps: {
|
tableProps: {
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
formatter: (row, column, cellValue, index) => {
|
formatter: (row, column, cellValue, index) => {
|
||||||
return `${row.uniscId || row.regNO || ''}`
|
return `${row.uniscid || row.regNO || ''}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -69,7 +69,7 @@ export default {
|
||||||
tableProps: {
|
tableProps: {
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
formatter: (row, column, cellValue, index) => {
|
formatter: (row, column, cellValue, index) => {
|
||||||
return `${row.entName || ''}`
|
return `${row.entname || ''}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -153,13 +153,13 @@ export default {
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '属地机关',
|
label: '属地机关',
|
||||||
prop: 'localadmCn',
|
prop: 'localadm',
|
||||||
span: 6,
|
span: 6,
|
||||||
isView: false,
|
isView: false,
|
||||||
tableProps: {
|
tableProps: {
|
||||||
width: '200px',
|
width: '200px',
|
||||||
formatter: (row, column, cellValue, index) => {
|
formatter: (row, column, cellValue, index) => {
|
||||||
return `${row.localadmCn || ''}`
|
return `${row.localadmCn || cellValue}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showInForm: false
|
showInForm: false
|
||||||
|
|
@ -188,6 +188,7 @@ export default {
|
||||||
showIndex: true,
|
showIndex: true,
|
||||||
indexWidth: '100px',
|
indexWidth: '100px',
|
||||||
showPagination: true,
|
showPagination: true,
|
||||||
|
rowKey: 'pripid',
|
||||||
tableProps: {
|
tableProps: {
|
||||||
headerCellStyle: { background: '#F5F5F5!important', color: '#333333!important', padding: '0px' },
|
headerCellStyle: { background: '#F5F5F5!important', color: '#333333!important', padding: '0px' },
|
||||||
headerRowStyle: { height: '48px' },
|
headerRowStyle: { height: '48px' },
|
||||||
|
|
@ -225,7 +226,7 @@ export default {
|
||||||
entity: {
|
entity: {
|
||||||
...parseSearchFormData
|
...parseSearchFormData
|
||||||
}
|
}
|
||||||
}).then((data) => {
|
}).then(({ data }) => {
|
||||||
this.showNoDataMessage = !searchUscc && !entName
|
this.showNoDataMessage = !searchUscc && !entName
|
||||||
return {
|
return {
|
||||||
tableData: data.dataPage.records,
|
tableData: data.dataPage.records,
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@
|
||||||
<table border="1" cellspacing="0">
|
<table border="1" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="1">主体名称</td>
|
<td colspan="1">主体名称</td>
|
||||||
<td colspan="3">{{ data.entName }}</td>
|
<td colspan="3">{{ data.entname }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="1">统一社会信用代码/注册号</td>
|
<td colspan="1">统一社会信用代码/注册号</td>
|
||||||
<td colspan="3">{{ data.uniscId }}</td>
|
<td colspan="3">{{ data.uniscid }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="1">事实和理由</td>
|
<td colspan="1">事实和理由</td>
|
||||||
|
|
|
||||||
|
|
@ -171,24 +171,24 @@ export default {
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '统一社会信用代码/注册号',
|
label: '统一社会信用代码/注册号',
|
||||||
prop: 'uniscId',
|
prop: 'uniscid',
|
||||||
tableProps: {
|
tableProps: {
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
width: '220px',
|
width: '220px',
|
||||||
formatter: (row, column, cellValue, index) => {
|
formatter: (row, column, cellValue, index) => {
|
||||||
return `${row.uniscId || row.regNo || ''}`
|
return `${row.uniscid || row.regNo || ''}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '主体名称',
|
label: '主体名称',
|
||||||
prop: 'entName',
|
prop: 'entname',
|
||||||
tableProps: {
|
tableProps: {
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
width: '300px',
|
width: '300px',
|
||||||
formatter: (row, column, cellValue, index) => {
|
formatter: (row, column, cellValue, index) => {
|
||||||
return `${row.entName || ''}`
|
return `${row.entname || ''}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -542,7 +542,7 @@ export default {
|
||||||
},
|
},
|
||||||
currentNodeID: this.currentNodeID
|
currentNodeID: this.currentNodeID
|
||||||
}).then((data) => {
|
}).then((data) => {
|
||||||
this.$message.success(`已完成对“${formData.entName}”的业务办理!`)
|
this.$message.success(`已完成对“${formData.entname}”的业务办理!`)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `/forceNotice/inclusion/${this.$route.meta.type}`
|
path: `/forceNotice/inclusion/${this.$route.meta.type}`
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ export default {
|
||||||
width: '180px',
|
width: '180px',
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
formatter: (row, column, cellValue, index) => {
|
formatter: (row, column, cellValue, index) => {
|
||||||
return `${row.uniscId || row.regNo}`
|
return `${row.uniscid || row.regNo}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showInTable: () => {
|
showInTable: () => {
|
||||||
|
|
@ -200,7 +200,7 @@ export default {
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '主体名称',
|
label: '主体名称',
|
||||||
prop: 'entName',
|
prop: 'entname',
|
||||||
span: 6,
|
span: 6,
|
||||||
tableProps: {
|
tableProps: {
|
||||||
width: '200px',
|
width: '200px',
|
||||||
|
|
@ -401,7 +401,7 @@ export default {
|
||||||
confirmHandlerPromise: () => {
|
confirmHandlerPromise: () => {
|
||||||
return xrForceDeregisterSpeSaveIvdAcceptNew({
|
return xrForceDeregisterSpeSaveIvdAcceptNew({
|
||||||
pripIdList: entlist.map((item) => {
|
pripIdList: entlist.map((item) => {
|
||||||
return item.pripId
|
return item.pripid
|
||||||
}),
|
}),
|
||||||
busType: 'inclusion'
|
busType: 'inclusion'
|
||||||
}).then((data) => {
|
}).then((data) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue