Commit f8192251 authored by 郭铭瑶's avatar 郭铭瑶 🤘

对接后台测试接口

parent 2afbf3cc
...@@ -9,7 +9,8 @@ case 'production': ...@@ -9,7 +9,8 @@ case 'production':
default: default:
IMG_URL = 'http://localhost:8080/static/' IMG_URL = 'http://localhost:8080/static/'
FILE_URL = '/static/' FILE_URL = '/static/'
BASE_URL = 'https://yapi.omniview.pro/mock/54/propertyinspector/api/v1' // BASE_URL = 'https://yapi.omniview.pro/mock/54/propertyinspector/api/v1'
BASE_URL = 'http://www.962121.net/hmfmstest/shanghaiwuye/propertyinspector/api/v1'
}; };
export default { export default {
// BASE_URL: 'http://sunmonster.vicp.cc:41318/pudong/', // BASE_URL: 'http://sunmonster.vicp.cc:41318/pudong/',
......
...@@ -32,14 +32,4 @@ export default { ...@@ -32,14 +32,4 @@ export default {
commit('SET_PERSON_LIST', common.confirm(res, 'data.content', [])) commit('SET_PERSON_LIST', common.confirm(res, 'data.content', []))
}) })
}, },
GET_THEME_DATA({commit}, data) {
// TODO
ajax.get({
url: 'test',
params: data,
}).then(res => {
commit('SET_COMMUNITY', res.data)
commit('SET_PERSON', res.data)
})
}
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@click="handleClick(item)" @click="handleClick(item)"
> >
<div class="dot" /> <div class="dot" />
<p :title="item.COMMUNITYNAME">{{item.COMMUNITYNAME | check}}</p> <b :title="item.COMMUNITYNAME">{{item.COMMUNITYNAME | check}}</b>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<span class="line line2"/> <span class="line line2"/>
<span class="label label1"> <span class="label label1">
<span class="dot"/> <span class="dot"/>
开具整改单数:{{count.rectify}} <b>开具整改单数:{{count.rectify}}</b>
</span> </span>
<span class="label label2"> <span class="label label2">
完成检查小区数:{{count.checked}} <b>完成检查小区数:{{count.checked}}</b>
<span class="dot"/> <span class="dot"/>
</span> </span>
<div> <div>
......
<template> <template>
<div class="situation-container"> <div class="situation-container">
<div v-for="(item, index) in list" :key="item.label" :class="`box box${index + 1}`"> <div v-for="(item, index) in list" :key="item.label" :class="`box box${index + 1}`">
<p>{{item.label}}</p> <b>{{item.label}}</b>
<div> <div>
<img :src="require(`@/assets/images/${item.icon}.png`)" /> <img :src="require(`@/assets/images/${item.icon}.png`)" />
<span><m-count :value="item.count" :decimal="0" /></span> <span><m-count :value="item.count" :decimal="0" /></span>
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
span span
color red color red
text-shadow 0 0 0.3rem red text-shadow 0 0 0.3rem red
p b
color #ccc color #ccc
img img
width 3rem width 3rem
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
'minus', 'minus',
'full', 'full',
'refresh', 'refresh',
'search', // 'search',
], ],
curBtn: null, curBtn: null,
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@click="handleClick(item)" @click="handleClick(item)"
> >
<img src="@/assets/images/location.png"/> <img src="@/assets/images/location.png"/>
<span>{{item.TE_NAME}}</span> <b>{{item.TE_NAME}}</b>
</div> </div>
</div> </div>
</template> </template>
...@@ -55,6 +55,6 @@ export default { ...@@ -55,6 +55,6 @@ export default {
img img
width 1rem width 1rem
margin-right 0.8rem margin-right 0.8rem
span b
color #fff color #fff
</style> </style>
...@@ -4,11 +4,14 @@ ...@@ -4,11 +4,14 @@
v-for="(item, index) in list" v-for="(item, index) in list"
:key="index" :key="index"
:class="`${item.TASK_ID == curId ? 'on' : ''}`" :class="`${item.TASK_ID == curId ? 'on' : ''}`"
@click="handleClick(item.TASK_ID)" @click="handleClick(item)"
> >
<div class="flag" :style="`background-image:url(${require('@/assets/images/flag-bg.png')})`">{{item.DEPTTYPE.charAt(0)}}</div> <div class="flag" :style="`background-image:url(${require('@/assets/images/flag-bg.png')})`">{{item.DEPTTYPE.charAt(0)}}</div>
<div class="content"> <div class="content">
<p class="title" :title="item.TASK_NAME">{{item.TASK_NAME | check}}<span>{{item.THEMETYPE}}</span></p> <p class="title" :title="item.TASK_NAME">
<b>{{item.TASK_NAME}}</b>
<span>{{item.THEMETYPE}}</span>
</p>
<p class="date">{{dateFormat(item.START_DATE)}} ~ {{dateFormat(item.END_DATE)}}</p> <p class="date">{{dateFormat(item.START_DATE)}} ~ {{dateFormat(item.END_DATE)}}</p>
</div> </div>
</div> </div>
...@@ -29,28 +32,28 @@ export default { ...@@ -29,28 +32,28 @@ export default {
}, },
}, },
methods: { methods: {
handleClick(id) { handleClick(data) {
if (this.curId == id) { if (this.curId == data.TASK_ID) {
this.curId = null this.curId = null
} else { } else {
this.curId = id this.curId = data.TASK_ID
} }
this.$emit('select', this.curId) this.$emit('select', data)
}, },
dateFormat(date) { dateFormat(date) {
if (!date) return '' if (!date) return ''
return this.$moment(date).format('YYYY-MM-DD') return this.$moment(date).format('YYYY-MM-DD')
} }
}, },
filters: { // filters: {
check(val) { // check(val) {
if (val && val.length > 13) { // if (val && val.length > 13) {
return ([].slice.call(val, 0, 13)).join('') + '...' // return ([].slice.call(val, 0, 13)).join('') + '...'
} else { // } else {
return val // return val
} // }
}, // },
} // }
} }
</script> </script>
...@@ -61,7 +64,7 @@ export default { ...@@ -61,7 +64,7 @@ export default {
>div >div
display flex display flex
align-items center align-items center
padding 0.5rem 0 padding 0.5rem 0 0.5rem 0.5rem
cursor pointer cursor pointer
&.on &.on
$selected() $selected()
...@@ -77,17 +80,29 @@ export default { ...@@ -77,17 +80,29 @@ export default {
font-size 1.5rem font-size 1.5rem
font-weight bold font-weight bold
margin-right 0.5rem margin-right 0.5rem
.title .content
color #fff .title
>span color #fff
display flex
align-items center
>b
display inline-block
max-width 12rem
overflow hidden
white-space nowrap
text-overflow ellipsis
>span
font-size 0.9rem
height 1.5rem
line-height 1.5rem
color $edgeColor
border 0.1rem solid $edgeColor
border-radius 0.3rem
padding 0 0.2rem
background-color $color-map()
margin-left 0.5rem
box-sizing border-box
.date
font-size 0.9rem font-size 0.9rem
color $edgeColor color #aaa
border 0.1rem solid $edgeColor
border-radius 0.3rem
padding 0 0.2rem
background-color $color-map()
margin-left 0.5rem
.date
font-size 0.9rem
color #aaa
</style> </style>
...@@ -228,15 +228,16 @@ export default { ...@@ -228,15 +228,16 @@ export default {
} }
}, },
methods: { methods: {
initData(themeId = null) { initData(themeId = null, startDate = null, endDate = null) {
const communityParams = {someday: this.$moment().format('YYYYMMDD')} const today = this.$moment().format('YYYYMMDD')
const personParams = {} const communityParams = {someday: today}
const personParams = {startDate: startDate || today, endDate: endDate || today}
if (themeId) { if (themeId) {
communityParams.taskId = themeId communityParams.taskId = themeId
personParams.taskId = themeId personParams.taskId = themeId
} }
if (!themeId) { if (!themeId) {
this.$store.dispatch('GET_THEME_LIST', {flag: 0, someday: this.$moment().format('YYYYMMDD')}) this.$store.dispatch('GET_THEME_LIST', {flag: 0, someday: today})
} }
this.$store.dispatch('GET_COMMUNITY_LIST', communityParams) this.$store.dispatch('GET_COMMUNITY_LIST', communityParams)
this.$store.dispatch('GET_PERSON_LIST', personParams) this.$store.dispatch('GET_PERSON_LIST', personParams)
...@@ -388,8 +389,8 @@ export default { ...@@ -388,8 +389,8 @@ export default {
}).then(res => { }).then(res => {
const followList = this.$com.confirm(res, 'data.content.fellowList', []) const followList = this.$com.confirm(res, 'data.content.fellowList', [])
this.communityData = (this.$com.confirm(res, 'data.content.content', []))[0] this.communityData = (this.$com.confirm(res, 'data.content.content', []))[0]
const follower = followList.find(item => item.THEMEID == this.communityData.TASK_ID) const followers = followList.filter(item => item.THEMEID == this.communityData.TASK_ID)
this.communityData.TE_NAME = (follower && follower.TE_NAME) || '无' this.communityData.TE_NAME = (followers.length > 0 && followers.join(',')) || '无'
this.communityData.IS_PUBLISH = this.communityData.IS_PUBLISH == '1' ? '是' : '否' this.communityData.IS_PUBLISH = this.communityData.IS_PUBLISH == '1' ? '是' : '否'
this.communityTableData = this.$com.confirm(res, 'data.content.indexList', []) this.communityTableData = this.$com.confirm(res, 'data.content.indexList', [])
this.showCommunityModal = true this.showCommunityModal = true
...@@ -399,8 +400,8 @@ export default { ...@@ -399,8 +400,8 @@ export default {
this.$refs.community.reset() this.$refs.community.reset()
this.$refs.community2.reset() this.$refs.community2.reset()
}, },
handleThemeSelect(id) { handleThemeSelect({TASK_ID, START_DATE, END_DATE}) {
this.initData(id) this.initData(TASK_ID, START_DATE, END_DATE)
}, },
} }
} }
......
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