Browse Source

完善数据大屏

master
myTest383 6 months ago
parent
commit
af5acd82b2
  1. 70
      src/api/gd36524/shanhaiGf.js
  2. BIN
      src/assets/fadianliangbg.png
  3. 198
      src/layout/index.vue
  4. 29
      src/main.js
  5. 26
      src/router/index.js
  6. 2
      src/styles/index.scss
  7. 256
      src/views/mortgage/projectCredit.vue
  8. 223
      src/views/mortgage/projectCustomer.vue
  9. 297
      src/views/mortgage/projectInfo.vue
  10. 789
      src/views/mortgage/projectList.vue
  11. 262
      src/views/mortgage/projectReport.vue
  12. 220
      src/views/mortgage/projectSupplier.vue
  13. 1393
      src/views/mortgage/shanhaiGf.vue
  14. 221
      vue.config.js

70
src/api/gd36524/shanhaiGf.js

@ -20,8 +20,18 @@ export default {
});
},
// 右上电子发电数据
rightTopInfo_shDZTJ: function(data) {
return request({
url: '/datacenter/shDZTJ',
method: 'post',
data: data
});
},
// 左下柱状图数据
// 左下柱状图数据(旧)
leftBomInfo: function(data) {
return request({
url: '/datacenter/getEnterpriseInfo',
@ -30,6 +40,17 @@ export default {
});
},
// 左下柱状图数据 (修改之后)
leftBomInfo_shXMGG: function(data) {
return request({
url: '/datacenter/shXMGG',
method: 'post',
data: data
});
},
// 右下报告数据
rightBomInfo: function(data) {
return request({
@ -108,4 +129,51 @@ export default {
});
},
// 项目列表
getProjectPageList: function(data) {
return request({
url: '/datacenter/getProjectPageList',
method: 'post',
data: data
});
},
// 供应商列表
getSuppliserList: function(data) {
return request({
url: '/datacenter/getSuppliserInfo',
method: 'post',
data: data
});
},
// 客户列表
getCustomerList: function(data) {
return request({
url: '/datacenter/getCustomerInfo',
method: 'post',
data: data
});
},
// 还信记录列表
getCreditList: function(data) {
return request({
url: '/v1/projectcreditbalance/listPage',
method: 'post',
data: data
});
},
// 报告列表
getReportList: function(data) {
return request({
url: '/datacenter/getProjectReportByNode',
method: 'post',
data: data
});
},
}

BIN
src/assets/fadianliangbg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

198
src/layout/index.vue

@ -1,114 +1,118 @@
<template>
<div :class="classObj" class="app-wrapper">
<div class="fixed-header">
<navbar />
<div :class="classObj" class="app-wrapper">
<div class="fixed-header">
<navbar />
</div>
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<div class="main-container">
<div class="home-box">
<a href="javascript:window.opener=null;window.open('','_self');window.close();"
class="text-center">平台首页</a>
<a href="javascript:void(0);" class="text-center">地图标注</a>
</div>
<sidebar class="sidebar-container" />
<!--菜单-->
<div class="TagsView">
<tags-view />
<!--横向标签-->
</div>
<app-main />
<!--<el-footer height="40px">Copyright © 2021 技术支持集团 All Rights Reserved</el-footer>-->
</div>
</div>
<div
v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg"
@click="handleClickOutside"
/>
<div class="main-container">
<div class="home-box">
<a href="javascript:window.opener=null;window.open('','_self');window.close();" class="text-center">平台首页</a>
<a href="javascript:void(0);" class="text-center">地图标注</a>
</div>
<sidebar class="sidebar-container" />
<!--菜单-->
<div class="TagsView">
<tags-view />
<!--横向标签-->
</div>
<app-main />
<!--<el-footer height="40px">Copyright © 2021 技术支持集团 All Rights Reserved</el-footer>-->
</div>
</div>
</template>
<script>
import { AppMain, Navbar, Sidebar, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
import {
AppMain,
Navbar,
Sidebar,
TagsView
} from './components'
import ResizeMixin from './mixin/ResizeHandler'
import {
mapState
} from 'vuex'
export default {
name: 'Layout',
components: {
AppMain,
Navbar,
Sidebar,
TagsView
},
mixins: [ResizeMixin],
computed: {
...mapState({
sidebar: (state) => state.app.sidebar,
device: (state) => state.app.device
}),
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
export default {
name: 'Layout',
components: {
AppMain,
Navbar,
Sidebar,
TagsView
},
mixins: [ResizeMixin],
computed: {
...mapState({
sidebar: (state) => state.app.sidebar,
device: (state) => state.app.device
}),
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
}
}
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/mixin.scss";
@import "~@/styles/variables.scss";
@import "~@/styles/mixin.scss";
@import "~@/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: 100%;
transition: width 0.28s;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: 100%;
transition: width 0.28s;
}
// .hideSidebar .fixed-header {
// width: calc(100% - 54px)
// }
// .hideSidebar .fixed-header {
// width: calc(100% - 54px)
// }
.mobile .fixed-header {
width: 100%;
}
.mobile .fixed-header {
width: 100%;
}
.el-footer {
line-height: 40px;
text-align: center;
background-color: #f7f9fc;
}
</style>
.el-footer {
line-height: 40px;
text-align: center;
background-color: #f7f9fc;
}
</style>

29
src/main.js

@ -10,33 +10,44 @@ import router from './router'
import '@/icons' // 引入icon文件夹下所有的svg
// 全局自定义组件
import Pagination from '@/components/pagination/index.vue'
import tabsearch from '@/components/tab-search/index.vue'
import eimage from '@/components/E-image/index.vue'
import scroll from 'vue-seamless-scroll'
Vue.use(scroll)
Vue.component('Pagination', Pagination)
Vue.component('tab-search', tabsearch)
Vue.component('eimage', eimage)
// import VueAMap from 'vue-amap'
import VueAMap from '@vuemap/vue-amap';
import '@vuemap/vue-amap/dist/style.css'
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
key: '71cdeafd6ae271e523d4f46cd6f27b0f', // 此处的key,在高德开放平台申请
plugins: ['AMap.ElasticMarker', 'AMap.ToolBar', 'AMap.Scale', 'AMap.MapType', 'AMap.Geolocation', 'AMap.MouseTool', 'AMap.PlaceSearch', 'AMap.Geocoder'], // 此处的插件按需添加
securityJsCode: '00718d70da54e9abb87550e2a043ae0f'
key: '71cdeafd6ae271e523d4f46cd6f27b0f', // 此处的key,在高德开放平台申请
plugins: ['AMap.ElasticMarker', 'AMap.ToolBar', 'AMap.Scale', 'AMap.MapType', 'AMap.Geolocation',
'AMap.MouseTool', 'AMap.PlaceSearch', 'AMap.Geocoder'
], // 此处的插件按需添加
securityJsCode: '00718d70da54e9abb87550e2a043ae0f'
})
import VueBMap from 'vue-bmap-gl';
import 'vue-bmap-gl/dist/style.css'
Vue.use(VueBMap);
VueBMap.initBMapApiLoader({
ak: 'qqdUS2cGyThesPRPKWWbXG2G',
v: '1.0'
ak: 'qqdUS2cGyThesPRPKWWbXG2G',
v: '1.0'
});
Vue.use(ElementUI)
Vue.config.productionTip = false
new Vue({
el: '#app',
router,
store,
render: h => h(App)
el: '#app',
router,
store,
render: h => h(App)
})

26
src/router/index.js

@ -78,6 +78,32 @@ export const constantRoutes = [{
name: 'shanhaiGf',
component: () => import('@/views/mortgage/shanhaiGf.vue')
},
{
path: "/projectList",
name: 'projectList',
component: () => import('@/views/mortgage/projectList.vue')
},
{
path: "/projectReport",
name: 'projectReport',
component: () => import('@/views/mortgage/projectReport.vue')
},
{
path: "/projectCredit",
name: 'projectCredit',
component: () => import('@/views/mortgage/projectCredit.vue')
},
{
path: "/projectCustomer",
name: 'projectCustomer',
component: () => import('@/views/mortgage/projectCustomer.vue')
},
{
path: "/projectSupplier",
name: 'projectSupplier',
component: () => import('@/views/mortgage/projectSupplier.vue')
},
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }

2
src/styles/index.scss

@ -128,7 +128,7 @@ div:focus {
background-color: #fff;
}
// 设置了滚动区域
.main-content{ overflow-x: hidden;overflow-y: auto;height: calc(100vh - 200px);padding: 0 20px;}
.main-content{ overflow-x: hidden;overflow-y: auto;height: 100vh;padding: 10px 20px;}
.listcon{height: calc(100vh - 425px);overflow-y: auto;overflow-x: hidden;}
.listconadd{height: calc(100vh - 200px);overflow-y: auto;overflow-x: hidden;}
.listconadd{

256
src/views/mortgage/projectCredit.vue

@ -0,0 +1,256 @@
<template>
<div class="app-container" style="">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="还信总览" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn"
@click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="项目名称">
<el-input v-model="queryParams.params.warehouseName" maxlength="20"
placeholder="请输入项目名称" class="addinputw" clearable />
</el-form-item>
<el-form-item label="填报日期">
<el-date-picker v-model="queryParams.params.dataDateStart" type="date" clearable
value-format="yyyy-MM-dd" placeholder="选择填报开始日期" style="width: 200px;" />
<span style="padding: 0 8px"></span>
<el-date-picker v-model="queryParams.params.dataDateEnd" type="date" clearable
value-format="yyyy-MM-dd" placeholder="选择填报结束日期" style="width: 200px;" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search"
@click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh"
@click="resetQuery">重置</el-button>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">还信列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column prop="projectname" label="项目名称" width="400" align="left"
header-align="center" />
<el-table-column prop="typename" label="类型" align="center" />
<el-table-column prop="tbdate" label="填报日期" align="center" />
<el-table-column prop="money" label="金额" align="center" />
<el-table-column prop="remarks" label="备注" align="center" />
<el-table-column label="附件" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" v-show="scope.row.pzfiles.length>0"
@click="showFiles(scope.row.pzfiles)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.pzfiles.length==0">暂无</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
</div>
</div>
<!-- 附件列表-->
<el-dialog title="附件列表" :visible.sync="dialogReport" width="80%" :before-close="handleCloseReport">
<div style="display: flex;flex-direction: row;margin-top: -30px;">
<el-image v-for="(item, index) of files" :key="index" :src="item"
style="width: 120px;height: 120px;padding: 10px;" :preview-src-list="files"></el-image>
</div>
</el-dialog>
<!-- <projectInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="loadList" /> -->
</div>
</template>
<script>
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/gd36524/shanhaiGf'
import projectInfo from './projectInfo.vue'
export default {
name: 'DaydatauploadCash',
components: {
ButtonBar,
Pagination,
pageye,
projectInfo
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: true,
searchxianshitit: '隐藏查询条件',
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
projectSid: '',
warehouseName: "",
lx: "1"
}
},
tableLoading: false,
dataList: [],
btnList: [{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}],
dialogReport: false,
files: []
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
// url
const searchParams = new URLSearchParams(/(?<=#.*\?).*/.exec(window.location.href)[0]);
console.log("searchParams>>>>", searchParams)
//
this.queryParams.params.projectSid = searchParams.get('projectSid');
console.log('mounted:', this.queryParams.params)
this.loadList()
},
created() {},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'showUploadXlsx':
this.showUploadXlsx()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
projectSid: this.$route.params.projectSid,
warehouseName: "",
lx: "1"
}
}
this.loadList()
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
loadList() {
req.getCreditList(this.queryParams).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
}).catch(e => {
console.log('CsmCashLog-loadList-ee:', e)
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
// this.dialogReport1 = true
},
showFiles(list) {
this.files = list
this.dialogReport = true
},
handleCloseReport() {
this.dialogReport = false
}
}
}
</script>
<style scoped>
/* @import "~@/styles/index.scss"; */
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
.tleftb2 {
text-align: center;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.tleftb3 {
display: flex;
height: 100%;
flex-direction: row;
align-items: center;
justify-content: center;
text-align: center;
font-size: 14px;
color: #666666;
}
</style>

223
src/views/mortgage/projectCustomer.vue

@ -0,0 +1,223 @@
<template>
<div class="app-container" style="">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="客户总览" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn"
@click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="客户名称">
<el-input v-model="queryParams.params.customerName" maxlength="20" placeholder="请输入客户名称"
class="addinputw" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search"
@click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh"
@click="resetQuery">重置</el-button>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">客户列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column prop="name" label="客户名称" header-align="center" align="left" width="500" />
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center" />
<el-table-column label="地址" header-align="center" align="left" width="500">
<template slot-scope="scope">
<span>{{scope.row.province}}{{scope.row.city}}{{scope.row.county}}{{scope.row.address}}</span>
</template>
</el-table-column>
<el-table-column prop="certificateType" label="证件类型" align="center" />
<el-table-column prop="idnumber" label="证件号码" align="center" />
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
</div>
</div>
<!-- <projectInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="loadList" /> -->
</div>
</template>
<script>
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/gd36524/shanhaiGf'
import projectInfo from './projectInfo.vue'
export default {
name: 'DaydatauploadCash',
components: {
ButtonBar,
Pagination,
pageye,
projectInfo
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: true,
searchxianshitit: '隐藏查询条件',
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
projectSid: '',
customerName: "",
}
},
tableLoading: false,
dataList: [],
btnList: [{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}],
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
// url
const searchParams = new URLSearchParams(/(?<=#.*\?).*/.exec(window.location.href)[0]);
console.log("searchParams>>>>", searchParams)
//
this.queryParams.params.projectSid = searchParams.get('projectSid');
console.log('mounted:', this.queryParams.params)
this.loadList()
},
created() {},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'showUploadXlsx':
this.showUploadXlsx()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
projectSid: '',
customerName: "",
}
}
this.loadList()
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
loadList() {
req.getCustomerList(this.queryParams).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
}).catch(e => {
console.log('CsmCashLog-loadList-ee:', e)
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
// this.dialogReport1 = true
},
}
}
</script>
<style scoped>
/* @import "~@/styles/index.scss"; */
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
.tleftb2 {
text-align: center;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.tleftb3 {
display: flex;
height: 100%;
flex-direction: row;
align-items: center;
justify-content: center;
text-align: center;
font-size: 14px;
color: #666666;
}
</style>

297
src/views/mortgage/projectInfo.vue

@ -0,0 +1,297 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<!-- <el-button type="info" size="small" @click="handleReturn()">进入山海详情</el-button> -->
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div>
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty">项目名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.warehouseName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">项目地址</div>
<el-form-item><span class="addinputInfo">{{ formobj.address }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">项目负责人</div>
<el-form-item><span class="addinputInfo">{{ formobj.manager }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">联系电话</div>
<el-form-item><span class="addinputInfo">{{ formobj.telephone }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">电站ID</div>
<el-form-item><span class="addinputInfo">{{ formobj.warehouseCode }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">性质</div>
<el-form-item><span class="addinputInfo">{{ formobj.creditNature }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">规模</div>
<el-form-item><span class="addinputInfo">{{ formobj.squareMeter }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">发电量</div>
<el-form-item><span class="addinputInfo">{{ formobj.totalDayPower }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">项目单位及股权</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">查看工商风险</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">预计到货日期</div>
<el-form-item><span
class="addinputInfo">{{ formobj.expectedDeliveryDate }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">预计完工日期</div>
<el-form-item><span
class="addinputInfo">{{ formobj.expectedCompletionDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">项目手续资料附件</div>
<el-form-item><span class="addinputInfo">查看</span></el-form-item>
</el-col>
</el-row>
<div class="title">采购合同供货方</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="12">
<div class="span-sty">供方名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">供方性质</div>
<el-form-item><span class="addinputInfo">{{ formobj.supplierType }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">组件</div>
<el-form-item><span class="addinputInfo">{{ formobj.goodsDetail }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">逆变器</div>
<el-form-item><span class="addinputInfo">{{ formobj.goodsDetail }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">还信情况</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="12">
<div class="span-sty">放款日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.tbdate }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">放款金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.money }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">还款日期</div>
<el-form-item><span class="addinputInfo"></span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">还款金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.hkMoney }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">工程进度</div>
<el-table :key="tableKey" :data="formobj.projectEngineeringList" :index="index" border
style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="progressDescription" label="阶段名称" align="center" />
<el-table-column prop="orderDate" label="发生日期" align="center" />
<el-table-column prop="remarks" label="备注" align="center" />
<el-table-column prop="nextStage" label="下一阶段" align="center" />
<el-table-column label="相关附件" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" v-show="scope.row.urls.length>0"
@click="showFiles(scope.row.urls)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.urls.length==0">暂无</el-button>
<!-- <span class="bluezi" @click="toInfo(scope.row)">查看</span> -->
</template>
</el-table-column>
</el-table>
<div class="title">监管工作日志</div>
<el-table :key="tableKey" :data="formobj.projectSupervisionLogList" :index="index" border
style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="regulatoryWork" label="工作名称" align="center" />
<el-table-column prop="orderDate" label="日期" align="center" />
<el-table-column prop="remarks" label="备注" align="center" />
<el-table-column prop="workArrangement" label="下一工作安排" align="center" />
<el-table-column label="日志附件" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" v-show="scope.row.urls.length>0"
@click="showFiles(scope.row.urls)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.urls.length==0">暂无</el-button>
<!-- <span class="bluezi" @click="toInfo(scope.row)">查看</span> -->
</template>
</el-table-column>
</el-table>
<div class="title">监管报告</div>
<el-table :key="tableKey" :data="formobj.urlsVos" :index="index" border style="width: 100%;">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="typeKey" label="报告类型" align="center" />
<el-table-column prop="createTime" label="上传日期" align="center" />
<el-table-column label="附件" align="center">
<template slot-scope="scope">
<span style="color: blue;cursor: pointer;"
@click="itemClick(scope.row)">{{scope.row.name}}</span>
<!-- <span class="bluezi" @click="toInfo(scope.row)">查看</span> -->
</template>
</el-table-column>
</el-table>
</el-form>
<div style="height: 50px;">
</div>
</div>
<!-- 附件列表-->
<el-dialog title="附件列表" :visible.sync="dialogFile" width="80%" :before-close="handleCloseDialogFile">
<div style="display: flex;flex-direction: row;margin-top: -30px;">
<el-image v-for="(item, index) of files" :key="index" :src="item"
style="width: 120px;height: 120px;padding: 10px;" :preview-src-list="files"></el-image>
</div>
</el-dialog>
<!-- 查看报告-->
<el-dialog title="查看报告" :visible.sync="dialogReport" width="800px" :before-close="handleCloseReport"
style="z-index:999">
<iframe :src="reportUrl" width="750" height="400" id="ysOpenDevice" allowfullscreen>
</iframe>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/gd36524/shanhaiGf'
export default {
name: 'PurchaseReturnInfo',
components: {},
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
},
files: [],
dialogFile: false,
reportUrl: '',
dialogReport: false,
}
},
methods: {
showInfo(row) {
this.viewTitle = '项目详情'
console.log('showFiles', this.files)
this.formobj = row
// req.fetchDetailsBySid(row.sid).then((res) => {
// if (res.success) {
// this.formobj = res.data
// }
// })
},
handleReturn(isreload) {
this.formobj = {}
this.$emit('doback')
},
showFiles(list) {
for (var i = 0; i < list.length; i++) {
this.files.push(list[i].absolutePath)
}
// this.files = [
// "https://tse2-mm.cn.bing.net/th/id/OIP-C.ZkoPhpKfJwsvGmpm8RsragHaFp?rs=1&pid=ImgDetMain",
// "https://ts1.cn.mm.bing.net/th/id/R-C.57384e4c2dd256a755578f00845e60af?rik=uy9%2bvT4%2b7Rur%2fA&riu=http%3a%2f%2fimg06file.tooopen.com%2fimages%2f20171224%2ftooopen_sy_231021357463.jpg&ehk=whpCWn%2byPBvtGi1%2boY1sEBq%2frEUaP6w2N5bnBQsLWdo%3d&risl=&pid=ImgRaw&r=0",
// "https://img-blog.csdnimg.cn/2021051521244130.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl81MzQ0Nzc3Ng==,size_16,color_FFFFFF,t_70",
// ]
this.dialogFile = true
console.log('showFiles', this.files)
},
handleCloseDialogFile() {
this.dialogFile = false
},
itemClick(row) {
console.log('itemClick', row)
window.open(row.absolutePath);
},
handleCloseReport() {
},
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.scroll {
overflow: scroll;
}
.scroll::-webkit-scrollbar {
display: none;
}
</style>

789
src/views/mortgage/projectList.vue

@ -0,0 +1,789 @@
<template>
<div class="app-container" style="">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="项目总览" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn"
@click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="项目名称">
<el-input v-model="queryParams.params.warehouseName" maxlength="20"
placeholder="请输入项目名称" class="addinputw" clearable />
</el-form-item>
<el-form-item label="项目地址">
<el-input v-model="queryParams.params.address" maxlength="20" placeholder="请输入项目名称"
class="addinputw" clearable />
</el-form-item>
<el-form-item label="电站ID">
<el-input v-model="queryParams.params.warehouseCode" maxlength="20"
placeholder="请输入项目名称" class="addinputw" clearable />
</el-form-item>
<el-form-item label="性质">
<el-select v-model="queryParams.params.creditNature" placeholder="请选择" clearable
style="width: 200px;">
<el-option v-for="item in creditNatureList" :key="item.sid" :label="item.name"
:value="item.sid" />
</el-select>
</el-form-item>
<el-form-item label="阶段状态">
<el-select v-model="queryParams.params.nodeValue" placeholder="请选择" clearable
style="width: 200px;">
<el-option v-for="item in nodeValueList" :key="item.sid" :label="item.name"
:value="item.name" />
</el-select>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search"
@click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh"
@click="resetQuery">重置</el-button>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">项目列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" wid align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">详情</el-button>
<el-button type="primary" size="mini" :disabled="true"
@click="toMonitor(scope.row)">查看监控</el-button>
</template>
</el-table-column>
<el-table-column prop="warehouseName" label="项目名称" align="left" header-align="center"
width="410" />
<el-table-column prop="address" label="项目地址" align="left" header-align="center" width="420" />
<el-table-column prop="contacts" label="项目负责人" align="center" width="140" />
<el-table-column prop="warehouseCode" label="电站ID" align="center" width="100" />
<el-table-column prop="squareMeter" label="规模/发电量" align="center" width="140" />
<el-table-column label="项目公司情况" align="center" width="80">
<el-table-column prop="manager" label="名称" align="center" width="140" />
<el-table-column prop="remarks" label="放款后工商风险" align="center" width="140" />
</el-table-column>
<el-table-column label="采购合同供货方" align="center" width="80">
<el-table-column prop="supplierName" label="供方" align="left" header-align="center"
width="240" />
<el-table-column prop="supplierType" label="性质" align="center" width="140" />
<el-table-column prop="goodsDetail" label="商品明细" align="left" header-align="center"
width="140" />
</el-table-column>
<el-table-column prop="tbdate" label="放款日期" align="center" width="140" />
<el-table-column prop="money" label="放款金额" align="center" width="140" />
<el-table-column prop="expectedCompletionDate" label="预计完工日期" align="center" width="140" />
<el-table-column prop="expectedDeliveryDate" label="预计到货日期" align="center" width="140" />
<el-table-column prop="creditNature" label="性质" align="center" width="140" />
<el-table-column prop="creditStage" label="阶段状态" align="center" width="140" />
<el-table-column label="项目监管阶段" align="center" width="80">
<el-table-column label="日期" align="center" width="140">
<template slot-scope="scope">
<span>{{scope.row.projectEngineeringProgress.orderDate}}</span>
</template>
</el-table-column>
<el-table-column label="目前进度" align="center" width="140">
<template slot-scope="scope">
<span>{{scope.row.projectEngineeringProgress.progressDescription}}</span>
</template>
</el-table-column>
<el-table-column label="历史进度" align="center" width="140">
<template slot-scope="scope">
<el-button type="primary" size="mini"
v-show="scope.row.projectEngineeringList.length>0"
@click="showProgress(scope.row)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.projectEngineeringList.length==0">暂无</el-button>
<!-- <el-button type="primary" size="mini" @click="showLog(scope.row)">查看</el-button> -->
<!-- <span style="color: #018AD2; cursor: pointer;"
@click="showProgress(scope.row)">查看</span> -->
</template>
</el-table-column>
</el-table-column>
<el-table-column label="项目监管日志" align="center" width="80">
<el-table-column label="日期" align="center" width="140">
<template slot-scope="scope">
<span>{{scope.row.projectSupervisionLog.orderDate}}</span>
</template>
</el-table-column>
<el-table-column label="监管工作" align="center" width="140">
<template slot-scope="scope">
<span>{{scope.row.projectSupervisionLog.regulatoryWork}}</span>
</template>
</el-table-column>
<el-table-column label="下一步工作安排" align="center" width="140">
<template slot-scope="scope">
<span>{{scope.row.projectSupervisionLog.workArrangement}}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="140">
<template slot-scope="scope">
<span>{{scope.row.projectSupervisionLog.remarks}}</span>
</template>
</el-table-column>
<el-table-column label="监管日志" align="center" width="140">
<template slot-scope="scope">
<el-button type="primary" size="mini"
v-show="scope.row.projectSupervisionLogList.length>0"
@click="showLog(scope.row)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.projectSupervisionLogList.length==0">暂无</el-button>
<!-- <el-button type="primary" size="mini" @click="showLog(scope.row)">查看</el-button> -->
<!-- <span style="color: #018AD2; cursor: pointer;" @click="showLog(scope.row)">查看</span> -->
</template>
</el-table-column>
</el-table-column>
<el-table-column label="监管报告" align="center" width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" v-show="scope.row.urlsVos.length>0"
@click="showReport(scope.row)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.urlsVos.length==0">暂无</el-button>
<!-- <el-button type="primary" size="mini">查看</el-button> -->
<!-- <span style="color: #018AD2; cursor: pointer;" @click="showLog(scope.row)">查看</span> -->
</template>
</el-table-column>
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
</div>
</div>
<!-- 项目详情-->
<!-- <el-dialog title="项目详情" :visible.sync="dialogReport1" width="800px" :before-close="handleCloseReport1">
<el-form ref="form_daily" :model="projectInfo" label-position="right" class="formadd"
style="margin-top: -30px;">
<el-row class="first_row">
<el-col :span="4" class="tleftb2">
<span>项目名称</span>
</el-col>
<el-col :span="20" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>项目地址</span>
</el-col>
<el-col :span="20" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>项目负责人</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb2">
<span>联系电话</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>电站ID</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb2">
<span>性质</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>规模</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb2">
<span>发电量</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>项目单位及股权</span>
</el-col>
<el-col :span="20" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
<span>查看工商风险</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>预计到货日期</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb2">
<span>预计完工日期</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>项目手续资料附件</span>
</el-col>
<el-col :span="20" class="trightb">
<el-form-item>
<span>查看</span>
</el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>采购合同供货方</div>
</div>
<el-row class="first_row">
<el-col :span="4" class="tleftb2">
<span>供方名</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb2">
<span>供方性质</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>组件</span>
</el-col>
<el-col :span="20" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>逆变器</span>
</el-col>
<el-col :span="20" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>还信情况</div>
</div>
<el-row class="first_row">
<el-col :span="4" class="tleftb2">
<span>放款日期</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb2">
<span>放款金额</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb2">
<span>还款日期</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb2">
<span>还款金额</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{projectInfo.regulatoryWork}}</span>
</el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>工程进度</div>
</div>
<el-table :data="progressData" border style="width: 100%;">
<el-table-column label="序号" type="index" width="60" :index="indexMethod" align="center" />
<el-table-column label="阶段名称" prop="progressDescription" align="center" />
<el-table-column label="发生日期" prop="orderDate" align="center" />
<el-table-column label="下一阶段" prop="nextStage" align="center" />
<el-table-column label="备注" prop="remarks" align="center" />
<el-table-column label="相关附件" wid align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" v-show="scope.row.urls.length>0"
@click="doShowFile(scope.row.urls)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.urls.length==0">暂无</el-button>
</template>
</el-table-column>
</el-table>
<div class="title titleOne">
<div>监管工作日志</div>
</div>
<el-table :data="logData" border style="width: 98%;margin-left: 15px;margin-top: -20px;">
<el-table-column label="序号" type="index" width="60" :index="indexMethod" align="center" />
<el-table-column label="工作名称" prop="regulatoryWork" align="center" />
<el-table-column label="日期" prop="orderDate" align="center" />
<el-table-column label="下一步工作安排" prop="workArrangement" align="center" />
<el-table-column label="备注" prop="remarks" align="center" />
<el-table-column label="附件" wid align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" v-show="scope.row.urls.length>0"
@click="doShowFile(scope.row.urls)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.urls.length==0">暂无</el-button>
</template>
</el-table-column>
</el-table>
<div class="title titleOne">
<div>监管报告</div>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleCloseReport1()"> </el-button>
</span>
</el-dialog> -->
<!-- 项目进度-->
<el-dialog title="项目进度列表" :visible.sync="dialogReport2" width="80%" :before-close="handleCloseReport2">
<el-table :data="progressData" border style="width: 98%;margin-left: 15px;margin-top: -20px;">
<el-table-column label="序号" type="index" width="60" :index="indexMethod" align="center" />
<el-table-column label="阶段名称" prop="progressDescription" align="center" />
<el-table-column label="发生日期" prop="orderDate" align="center" />
<el-table-column label="下一阶段" prop="nextStage" align="center" />
<el-table-column label="备注" prop="remarks" align="center" />
<el-table-column label="附件" wid align="center">
<template slot-scope="scope">
<!-- <span style="color: #2094EB;cursor: pointer;text-decoration: underline"
v-show="scope.row.urls.length>0" @click="doShowFile(scope.row.urls)">查看</span>
<span v-show="scope.row.urls.length==0">暂无</span> -->
<el-button type="primary" size="mini" v-show="scope.row.urls.length>0"
@click="doShowFile(scope.row.urls)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.urls.length==0">暂无</el-button>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleCloseReport2()"> </el-button>
</span>
</el-dialog>
<!-- 项目日志-->
<el-dialog title="项目日志" :visible.sync="dialogReport3" width="80%" :before-close="handleCloseReport3">
<el-table :data="logData" border style="width: 98%;margin-left: 15px;margin-top: -20px;">
<el-table-column label="序号" type="index" width="60" :index="indexMethod" align="center" />
<el-table-column label="工作名称" prop="regulatoryWork" align="center" />
<el-table-column label="日期" prop="orderDate" align="center" />
<el-table-column label="下一步工作安排" prop="workArrangement" align="center" />
<el-table-column label="备注" prop="remarks" align="center" />
<el-table-column label="附件" wid align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" v-show="scope.row.urls.length>0"
@click="doShowFile(scope.row.urls)">查看</el-button>
<el-button type="primary" size="mini" style="margin-left: -2px;" :disabled="true"
v-show="scope.row.urls.length==0">暂无</el-button>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleCloseReport3()"> </el-button>
</span>
</el-dialog>
<!-- 附件列表-->
<el-dialog title="附件列表" :visible.sync="dialogReport5" width="80%" :before-close="handleCloseReport5">
<div style="display: flex;flex-direction: row;margin-top: -30px;">
<el-image v-for="(item, index) of files" :key="index" :src="item"
style="width: 120px;height: 120px;padding: 10px;" :preview-src-list="files"></el-image>
</div>
</el-dialog>
<!-- 监管报告列表-->
<el-dialog title="监管报告列表" :visible.sync="dialogReport6" width="80%" :before-close="handleCloseReport6">
<el-table :data="reportData" border style="width: 98%;margin-left: 15px;margin-top: -20px;">
<el-table-column label="序号" type="index" width="60" :index="indexMethod" align="center" />
<el-table-column prop="typeKey" label="报告类型" align="center" />
<el-table-column prop="createTime" label="上传日期" align="center" />
<el-table-column label="附件" wid align="center">
<template slot-scope="scope">
<span style="color: blue;cursor: pointer;"
@click="itemClick(scope.row)">{{scope.row.name}}</span>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleCloseReport6()"> </el-button>
</span>
</el-dialog>
<!-- 查看报告-->
<el-dialog title="查看报告" :visible.sync="dialogReport" width="800px" :before-close="handleCloseReport"
style="z-index:999">
<iframe :src="reportUrl" width="750" height="400" id="ysOpenDevice" allowfullscreen>
</iframe>
</el-dialog>
<projectInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="loadList" />
</div>
</template>
<script>
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/gd36524/shanhaiGf'
import projectInfo from './projectInfo.vue'
export default {
name: 'DaydatauploadCash',
components: {
ButtonBar,
Pagination,
pageye,
projectInfo
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: true,
searchxianshitit: '隐藏查询条件',
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
nodeValue: '',
projectSid: '',
warehouseName: "",
address: "",
warehouseCode: "",
creditNature: "",
belongingPlace: ""
}
},
tableLoading: false,
dataList: [],
btnList: [{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}],
projectList: [],
creditNatureList: [],
nodeValueList: [{
sid: "0",
name: "全部"
}, {
sid: "1",
name: "在途"
},
{
sid: "2",
name: "在建"
},
{
sid: "3",
name: "竣工"
},
],
dialogReport1: false,
dialogReport2: false,
dialogReport3: false,
dialogReport4: false,
dialogReport5: false,
dialogReport6: false,
files: [],
projectInfo: {},
progressData: [],
logData: [],
reportData: [],
reportUrl: '',
dialogReport: false,
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
// url
const searchParams = new URLSearchParams(/(?<=#.*\?).*/.exec(window.location.href)[0]);
console.log("searchParams>>>>", searchParams)
//
this.queryParams.params.nodeValue = searchParams.get('nodeValue');
this.queryParams.params.belongingPlace = searchParams.get('belongingPlace');
this.queryParams.params.projectSid = searchParams.get('projectSid');
console.log('mounted:', this.queryParams.params)
this.loadList()
},
created() {},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'showUploadXlsx':
this.showUploadXlsx()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
nodeValue: '',
projectSid: this.$route.params.projectSid,
warehouseName: "",
address: "",
warehouseCode: "",
creditNature: "",
belongingPlace: ""
}
}
this.loadList()
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
loadList() {
req.getProjectPageList(this.queryParams).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
}).catch(e => {
console.log('CsmCashLog-loadList-ee:', e)
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
// this.dialogReport1 = true
},
handleCloseReport1() {
this.dialogReport1 = false
},
toMonitor(row) {
},
showProgress(row) {
this.progressData = row.projectEngineeringList
this.dialogReport2 = true
},
handleCloseReport2() {
this.dialogReport2 = false
},
showLog(row) {
this.logData = row.projectSupervisionLogList
this.dialogReport3 = true
},
handleCloseReport3() {
this.dialogReport3 = false
},
doShowFile(list) {
// this.files = list
for (var i = 0; i < list.length; i++) {
this.files.push(list[i].absolutePath)
}
// this.files = [
// "https://tse2-mm.cn.bing.net/th/id/OIP-C.ZkoPhpKfJwsvGmpm8RsragHaFp?rs=1&pid=ImgDetMain",
// "https://ts1.cn.mm.bing.net/th/id/R-C.57384e4c2dd256a755578f00845e60af?rik=uy9%2bvT4%2b7Rur%2fA&riu=http%3a%2f%2fimg06file.tooopen.com%2fimages%2f20171224%2ftooopen_sy_231021357463.jpg&ehk=whpCWn%2byPBvtGi1%2boY1sEBq%2frEUaP6w2N5bnBQsLWdo%3d&risl=&pid=ImgRaw&r=0",
// "https://img-blog.csdnimg.cn/2021051521244130.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl81MzQ0Nzc3Ng==,size_16,color_FFFFFF,t_70",
// ]
this.dialogReport5 = true
},
handleCloseReport5() {
this.dialogReport5 = false
},
showReport(row) {
this.reportData = row.urlsVos
this.dialogReport6 = true
},
handleCloseReport6() {
this.dialogReport6 = false
},
itemClick(row) {
console.log('itemClick', row)
window.open(row.absolutePath);
},
handleCloseReport() {
},
}
}
</script>
<style scoped>
/* @import "~@/styles/index.scss"; */
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
.tleftb2 {
text-align: center;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.tleftb3 {
display: flex;
height: 100%;
flex-direction: row;
align-items: center;
justify-content: center;
text-align: center;
font-size: 14px;
color: #666666;
}
</style>

262
src/views/mortgage/projectReport.vue

@ -0,0 +1,262 @@
<template>
<div class="app-container" style="">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="报告总览" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn"
@click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="报告名称">
<el-input v-model="queryParams.params.warehouseName" maxlength="20"
placeholder="请输入项目名称" class="addinputw" clearable />
</el-form-item>
<el-form-item label="报告类型">
<el-select v-model="queryParams.params.nodeValue" placeholder="请选择" clearable
style="width: 200px;">
<el-option v-for="item in nodeValueList" :key="item.sid" :label="item.name"
:value="item.name" />
</el-select>
</el-form-item>
<el-form-item label="上传日期">
<el-date-picker v-model="queryParams.params.dataDateStart" type="date" clearable
value-format="yyyy-MM-dd" placeholder="选择上传开始日期" style="width:200px;" />
<span style="padding: 0 8px"></span>
<el-date-picker v-model="queryParams.params.dataDateEnd" type="date" clearable
value-format="yyyy-MM-dd" placeholder="选择上传结束日期" style="width: 200px;" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search"
@click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh"
@click="resetQuery">重置</el-button>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">报告列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column label="序号" type="index" width="60" :index="indexMethod" align="center" />
<el-table-column prop="entryName" label="项目名称" width="500" header-align="center" align="left" />
<el-table-column prop="nodeValue" label="报告类型" align="center" />
<el-table-column prop="createTime" label="上传日期" align="center" />
<el-table-column label="附件" header-align="center" align="left">
<template slot-scope="scope">
<span style="color: blue;cursor: pointer;"
@click="itemClick(scope.row)">{{scope.row.name}}</span>
</template>
</el-table-column>
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
</div>
</div>
<!-- <projectInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="loadList" /> -->
</div>
</template>
<script>
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/gd36524/shanhaiGf'
import projectInfo from './projectInfo.vue'
export default {
name: 'DaydatauploadCash',
components: {
ButtonBar,
Pagination,
pageye,
projectInfo
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: true,
searchxianshitit: '隐藏查询条件',
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
nodeValue: '',
projectSid: '',
}
},
tableLoading: false,
dataList: [],
btnList: [{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}],
nodeValueList: [{
sid: "0",
name: "全部"
}, {
sid: "1",
name: "到货"
},
{
sid: "2",
name: "在建"
},
{
sid: "3",
name: "竣工"
},
],
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
// url
const searchParams = new URLSearchParams(/(?<=#.*\?).*/.exec(window.location.href)[0]);
console.log("searchParams>>>>", searchParams)
//
this.queryParams.params.nodeValue = searchParams.get('nodeValue');
this.queryParams.params.projectSid = searchParams.get('projectSid');
console.log('mounted:', this.queryParams.params)
this.loadList()
},
created() {},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'showUploadXlsx':
this.showUploadXlsx()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
nodeValue: '',
projectSid: this.$route.params.projectSid,
}
}
this.loadList()
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
loadList() {
req.getReportList(this.queryParams).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
}).catch(e => {
console.log('CsmCashLog-loadList-ee:', e)
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
// this.dialogReport1 = true
},
itemClick(row) {
console.log('itemClick', row)
window.open(row.absolutePath);
},
handleCloseReport() {
},
}
}
</script>
<style scoped>
/* @import "~@/styles/index.scss"; */
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
.tleftb2 {
text-align: center;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.tleftb3 {
display: flex;
height: 100%;
flex-direction: row;
align-items: center;
justify-content: center;
text-align: center;
font-size: 14px;
color: #666666;
}
</style>

220
src/views/mortgage/projectSupplier.vue

@ -0,0 +1,220 @@
<template>
<div class="app-container" style="">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="供应商总览" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn"
@click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="供应商名称">
<el-input v-model="queryParams.params.supplierName" maxlength="20"
placeholder="请输入供应商名称" class="addinputw" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search"
@click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh"
@click="resetQuery">重置</el-button>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">供应商列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column prop="supplierName" label="供应商名称" header-align="center" align="left" />
<el-table-column prop="address" label="供应商地址" header-align="center" align="left" />
<el-table-column prop="contactTelePhone" label="供应商电话" align="center" />
<el-table-column prop="contactName" label="供应商负责人" align="center" />
<el-table-column prop="contactMobile" label="负责人电话" align="center" />
<el-table-column prop="supplierTypeName" label="供应商类型" align="center" />
<el-table-column prop="remarks" label="备注" align="center" />
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
</div>
</div>
<!-- <projectInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="loadList" /> -->
</div>
</template>
<script>
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/gd36524/shanhaiGf'
import projectInfo from './projectInfo.vue'
export default {
name: 'DaydatauploadCash',
components: {
ButtonBar,
Pagination,
pageye,
projectInfo
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: true,
searchxianshitit: '隐藏查询条件',
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
projectSid: '',
supplierName: "",
}
},
tableLoading: false,
dataList: [],
btnList: [{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}],
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
// url
const searchParams = new URLSearchParams(/(?<=#.*\?).*/.exec(window.location.href)[0]);
console.log("searchParams>>>>", searchParams)
//
this.queryParams.params.projectSid = searchParams.get('projectSid');
console.log('mounted:', this.queryParams.params)
this.loadList()
},
created() {},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'showUploadXlsx':
this.showUploadXlsx()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
projectSid: this.$route.params.projectSid,
supplierName: "",
}
}
this.loadList()
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
loadList() {
req.getSuppliserList(this.queryParams).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
}).catch(e => {
console.log('CsmCashLog-loadList-ee:', e)
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
// this.dialogReport1 = true
},
}
}
</script>
<style scoped>
/* @import "~@/styles/index.scss"; */
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
.tleftb2 {
text-align: center;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.tleftb3 {
display: flex;
height: 100%;
flex-direction: row;
align-items: center;
justify-content: center;
text-align: center;
font-size: 14px;
color: #666666;
}
</style>

1393
src/views/mortgage/shanhaiGf.vue

File diff suppressed because it is too large

221
vue.config.js

@ -3,7 +3,7 @@ const path = require('path')
const defaultSettings = require('./src/settings.js')
function resolve(dir) {
return path.join(__dirname, dir)
return path.join(__dirname, dir)
}
const name = defaultSettings.title || '标准仓项目展示' // page title
@ -17,118 +17,119 @@ const port = process.env.port || process.env.npm_config_port || 9531 // dev port
// 所有配置项说明都可以在中找到https://cli.vuejs.org/config/
module.exports = {
/**
*如果计划在子路径下部署站点则需要设置publicPath
*例如GitHub页面如果您计划将站点部署到https://foo.github.io/bar/,
*然后publicPath应设置为/bar/
*在大多数情况下请使用/
*详细信息https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.NODE_ENV === 'production' ? '/map365/' : '/',
outputDir: 'gd36524-ui',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
hot: true, // 自动保存
host: '0.0.0.0',
port: port,
open: true,
overlay: {
warnings: false,
errors: true
/**
*如果计划在子路径下部署站点则需要设置publicPath
*例如GitHub页面如果您计划将站点部署到https://foo.github.io/bar/,
*然后publicPath应设置为/bar/
*在大多数情况下请使用/
*详细信息https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.NODE_ENV === 'production' ? '/map365/' : '/',
outputDir: 'gd36524-ui',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
hot: true, // 自动保存
host: '0.0.0.0',
port: port,
open: true,
overlay: {
warnings: false,
errors: true
},
proxy: {
'/api': { // 匹配所有以 '/api'开头的请求路径
target: process.env.VUE_APP_URL,
// target: 'https://supervise.yxtsoft.com/reportwxmpapi',
// target: process.env.VUE_APP_URL, // 代理目标的基础路径
changeOrigin: true, // 支持跨域
pathRewrite: { // 重写路径: 去掉路径中开头的'/api'
'^/api': ''
}
}
},
disableHostCheck: true
},
proxy: {
'/api': { // 匹配所有以 '/api'开头的请求路径
target: process.env.VUE_APP_URL,
// target: process.env.VUE_APP_URL, // 代理目标的基础路径
changeOrigin: true, // 支持跨域
pathRewrite: { // 重写路径: 去掉路径中开头的'/api'
'^/api': ''
configureWebpack: {
// 在webpack的name字段中提供应用程序的标题,以便
// 它可以在索引.html插入正确的标题。
name: name,
resolve: {
alias: {
'@': resolve('src'),
'@C': resolve('src/components')
}
}
}
},
disableHostCheck: true
},
configureWebpack: {
// 在webpack的name字段中提供应用程序的标题,以便
// 它可以在索引.html插入正确的标题。
name: name,
resolve: {
alias: {
'@': resolve('src'),
'@C': resolve('src/components')
}
}
},
chainWebpack(config) {
// 它可以提高第一屏的速度,建议打开预加载
config.plugin('preload').tap(() => [{
rel: 'preload',
// 忽略 runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial'
}])
chainWebpack(config) {
// 它可以提高第一屏的速度,建议打开预加载
config.plugin('preload').tap(() => [{
rel: 'preload',
// 忽略 runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial'
}])
// 当有很多页面时,会导致太多无意义的请求
config.plugins.delete('prefetch')
// 当有很多页面时,会导致太多无意义的请求
config.plugins.delete('prefetch')
// set svg-sprite-loader 设置 svg精灵加载程序
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
config
.when(process.env.NODE_ENV !== 'development',
config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
// set svg-sprite-loader 设置 svg精灵加载程序
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single')
}
)
}
}
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
config
.when(process.env.NODE_ENV !== 'development',
config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single')
}
)
}
}
Loading…
Cancel
Save