Commit f95d40b2 authored by YangAo's avatar YangAo 🇨🇳

扶持金额千分位显示

parent 7359058e
......@@ -17,7 +17,7 @@ import '@/icons' // icon
import '@/assets/icons' // icon
// import '@/permission' // permission control
// 千分位转换
import thousand from "@/utils/thousand";
import thousand from '@/utils/thousand'
/**
* If you don't want to use mock-server
......@@ -48,7 +48,7 @@ Viewer.setDefaults({
})
// 全局方法挂载
Vue.prototype.thousand = thousand;
Vue.prototype.thousand = thousand
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.parseTime = parseTime
......@@ -100,3 +100,8 @@ Vue.filter('transformDateByFormat', (value, format) => {
}
return moment(value).format(format || 'YYYY-MM-DD HH:mm:ss')
})
// 全局千分位过滤器
Vue.filter('numberThousandTranslate', value => {
return value.toLocaleString()
})
......@@ -199,9 +199,8 @@
</div>
<div class="row">
<span class="row-label">扶持资金:</span>
<span class="row-content">{{
item.isSupport === undefined || item.isSupport === null || item.isSupport === '0' ? '根据实际情况给予扶持' : item.supportAmount + '万元'
}}</span>
<span v-if="item.isSupport === undefined || item.isSupport === null || item.isSupport === '0'" class="row-content">根据实际情况给予扶持</span>
<span class="row-content">{{ item.supportAmount | numberThousandTranslate }}万元</span>
</div>
<div class="row">
<span class="row-label">政策标签:</span>
......
......@@ -82,9 +82,8 @@
<el-row>
<el-col :span="12">
<el-form-item label="扶持金额 :">
<span class="formValue">{{
info.isSupport === undefined ||info.isSupport === null || info.isSupport === '0' ? '根据实际情况给予扶持' : info.supportAmount + '万元'
}}</span>
<span v-if="info.isSupport === undefined ||info.isSupport === null || info.isSupport === '0'" class="formValue">根据实际情况给予扶持</span>
<span v-else class="formValue">{{ info.supportAmount | numberThousandTranslate }}万元</span>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -199,10 +198,8 @@
</el-col>
<el-col :span="12">
<span class="title">可能获得扶持资金:</span>
<span v-if="info.isSupport === undefined ||info.isSupport === null || info.isSupport === '0'" class="value">{{
'根据实际情况给予扶持'
}}</span>
<span v-else class="value">{{ info.supportAmount + '万元' }}</span>
<span v-if="info.isSupport === undefined ||info.isSupport === null || info.isSupport === '0'" class="value">根据实际情况给予扶持</span>
<span v-else class="value">{{ info.supportAmount | numberThousandTranslate }}万元</span>
</el-col>
</el-row>
<el-row class="row two-row">
......@@ -568,6 +565,14 @@ export default {
// 页面回滚到顶部
this.$root.$el.scrollIntoView()
},
beforeRouteEnter(to, from, next) {
// 从完善企业跳回来, 切换到政策指标
next(vm => {
if (from.path === '/personalCenter/components/AffiliatedEnterprisesUpdate') {
vm.detailType = '2'
}
})
},
methods: {
choseScanning(type) {
this.detailType = type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment