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

对接后台测试接口

parent 2afbf3cc
......@@ -9,7 +9,8 @@ case 'production':
default:
IMG_URL = 'http://localhost:8080/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 {
// BASE_URL: 'http://sunmonster.vicp.cc:41318/pudong/',
......
......@@ -32,14 +32,4 @@ export default {
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 @@
@click="handleClick(item)"
>
<div class="dot" />
<p :title="item.COMMUNITYNAME">{{item.COMMUNITYNAME | check}}</p>
<b :title="item.COMMUNITYNAME">{{item.COMMUNITYNAME | check}}</b>
</div>
</div>
</template>
......
......@@ -4,10 +4,10 @@
<span class="line line2"/>
<span class="label label1">
<span class="dot"/>
开具整改单数:{{count.rectify}}
<b>开具整改单数:{{count.rectify}}</b>
</span>
<span class="label label2">
完成检查小区数:{{count.checked}}
<b>完成检查小区数:{{count.checked}}</b>
<span class="dot"/>
</span>
<div>
......
<template>
<div class="situation-container">
<div v-for="(item, index) in list" :key="item.label" :class="`box box${index + 1}`">
<p>{{item.label}}</p>
<b>{{item.label}}</b>
<div>
<img :src="require(`@/assets/images/${item.icon}.png`)" />
<span><m-count :value="item.count" :decimal="0" /></span>
......@@ -45,7 +45,7 @@ export default {
span
color red
text-shadow 0 0 0.3rem red
p
b
color #ccc
img
width 3rem
......
......@@ -31,7 +31,7 @@ export default {
'minus',
'full',
'refresh',
'search',
// 'search',
],
curBtn: null,
}
......
......@@ -7,7 +7,7 @@
@click="handleClick(item)"
>
<img src="@/assets/images/location.png"/>
<span>{{item.TE_NAME}}</span>
<b>{{item.TE_NAME}}</b>
</div>
</div>
</template>
......@@ -55,6 +55,6 @@ export default {
img
width 1rem
margin-right 0.8rem
span
b
color #fff
</style>
......@@ -4,11 +4,14 @@
v-for="(item, index) in list"
:key="index"
: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="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>
</div>
</div>
......@@ -29,28 +32,28 @@ export default {
},
},
methods: {
handleClick(id) {
if (this.curId == id) {
handleClick(data) {
if (this.curId == data.TASK_ID) {
this.curId = null
} else {
this.curId = id
this.curId = data.TASK_ID
}
this.$emit('select', this.curId)
this.$emit('select', data)
},
dateFormat(date) {
if (!date) return ''
return this.$moment(date).format('YYYY-MM-DD')
}
},
filters: {
check(val) {
if (val && val.length > 13) {
return ([].slice.call(val, 0, 13)).join('') + '...'
} else {
return val
}
},
}
// filters: {
// check(val) {
// if (val && val.length > 13) {
// return ([].slice.call(val, 0, 13)).join('') + '...'
// } else {
// return val
// }
// },
// }
}
</script>
......@@ -61,7 +64,7 @@ export default {
>div
display flex
align-items center
padding 0.5rem 0
padding 0.5rem 0 0.5rem 0.5rem
cursor pointer
&.on
$selected()
......@@ -77,16 +80,28 @@ export default {
font-size 1.5rem
font-weight bold
margin-right 0.5rem
.content
.title
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
color #aaa
......
......@@ -228,15 +228,16 @@ export default {
}
},
methods: {
initData(themeId = null) {
const communityParams = {someday: this.$moment().format('YYYYMMDD')}
const personParams = {}
initData(themeId = null, startDate = null, endDate = null) {
const today = this.$moment().format('YYYYMMDD')
const communityParams = {someday: today}
const personParams = {startDate: startDate || today, endDate: endDate || today}
if (themeId) {
communityParams.taskId = themeId
personParams.taskId = 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_PERSON_LIST', personParams)
......@@ -388,8 +389,8 @@ export default {
}).then(res => {
const followList = this.$com.confirm(res, 'data.content.fellowList', [])
this.communityData = (this.$com.confirm(res, 'data.content.content', []))[0]
const follower = followList.find(item => item.THEMEID == this.communityData.TASK_ID)
this.communityData.TE_NAME = (follower && follower.TE_NAME) || '无'
const followers = followList.filter(item => item.THEMEID == this.communityData.TASK_ID)
this.communityData.TE_NAME = (followers.length > 0 && followers.join(',')) || '无'
this.communityData.IS_PUBLISH = this.communityData.IS_PUBLISH == '1' ? '是' : '否'
this.communityTableData = this.$com.confirm(res, 'data.content.indexList', [])
this.showCommunityModal = true
......@@ -399,8 +400,8 @@ export default {
this.$refs.community.reset()
this.$refs.community2.reset()
},
handleThemeSelect(id) {
this.initData(id)
handleThemeSelect({TASK_ID, START_DATE, END_DATE}) {
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