|
@@ -25,7 +25,10 @@
|
|
<view class="item-row space-between">
|
|
<view class="item-row space-between">
|
|
<uni-tag :text="item.dangerCatTitle" custom-style="background-color: #ecf5ff; border-color: #d9ecff; color: #409eff;"></uni-tag>
|
|
<uni-tag :text="item.dangerCatTitle" custom-style="background-color: #ecf5ff; border-color: #d9ecff; color: #409eff;"></uni-tag>
|
|
<uni-tag :inverted="true" :text="formatDangerLevel(item.dangerLevel)" type="success"></uni-tag>
|
|
<uni-tag :inverted="true" :text="formatDangerLevel(item.dangerLevel)" type="success"></uni-tag>
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-row space-between" v-if="item.dangerTags">
|
|
|
|
+ <uni-tag :text="item.dangerTags" custom-style="background-color: #ecf5ff; border-color: #d9ecff; color: #409eff;"></uni-tag>
|
|
|
|
+ </view>
|
|
<view class="item-row space-between">
|
|
<view class="item-row space-between">
|
|
<view class="icon-item">
|
|
<view class="icon-item">
|
|
<uni-icons type="location-filled" size="16" color="#999"></uni-icons>
|
|
<uni-icons type="location-filled" size="16" color="#999"></uni-icons>
|
|
@@ -45,15 +48,31 @@
|
|
<view class="icon-item">
|
|
<view class="icon-item">
|
|
<image class="icon" src="/static/images/admin_icon.png" mode="widthFix"></image>
|
|
<image class="icon" src="/static/images/admin_icon.png" mode="widthFix"></image>
|
|
<text class="word">{{item.groupName}}</text>
|
|
<text class="word">{{item.groupName}}</text>
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="icon-item" @click.stop="showSuperVisor(item)">
|
|
|
|
+ <image class="icon" src="/static/images/admin_icon.png" mode="widthFix"></image>
|
|
|
|
+ <text>(责任单位)</text>
|
|
|
|
+ <template>
|
|
|
|
+ <view class="supervisor" v-if="item.supervisorGroupList" >
|
|
|
|
+ <view class="supervisor-item" v-for="(supervisor,supervisoridx) in formatsupervisorGroupList(item.supervisorGroupList)" :key="supervisoridx">
|
|
|
|
+ <uni-tag :text="supervisor" custom-style="background-color: #ecf5ff; border-color: #d9ecff; color: #409eff;"></uni-tag>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="supervisor" v-else>
|
|
|
|
+ <uni-icons type="plusempty" size="20" color="#ccc"></uni-icons>
|
|
|
|
+ </view>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</uni-swipe-action-item>
|
|
</uni-swipe-action-item>
|
|
</uni-card>
|
|
</uni-card>
|
|
</uni-swipe-action>
|
|
</uni-swipe-action>
|
|
</view>
|
|
</view>
|
|
- <Create ref="danger" @success="search"></Create>
|
|
|
|
|
|
+ <Create ref="danger" @success="search" :ent="entCats" :danger="dangerCats"></Create>
|
|
<Detail ref="detail"></Detail>
|
|
<Detail ref="detail"></Detail>
|
|
|
|
+ <SupervisorList ref="SupervisorList" @success="search"></SupervisorList>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -61,11 +80,13 @@
|
|
import industryApi from '@/api/industry.js'
|
|
import industryApi from '@/api/industry.js'
|
|
import dangerApi from '@/api/danger.js'
|
|
import dangerApi from '@/api/danger.js'
|
|
import Create from './components/Create.vue'
|
|
import Create from './components/Create.vue'
|
|
- import Detail from './components/Detail.vue'
|
|
|
|
|
|
+ import Detail from './components/Detail.vue'
|
|
|
|
+ import SupervisorList from './components/SupervisorList.vue'
|
|
export default {
|
|
export default {
|
|
components:{
|
|
components:{
|
|
Create,
|
|
Create,
|
|
- Detail
|
|
|
|
|
|
+ Detail,
|
|
|
|
+ SupervisorList
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -73,7 +94,9 @@
|
|
page:1,
|
|
page:1,
|
|
limit:10,
|
|
limit:10,
|
|
total:0,
|
|
total:0,
|
|
- keywords: ""
|
|
|
|
|
|
+ keywords: "",
|
|
|
|
+ entCats:uni.getStorageSync('entCats')||[],
|
|
|
|
+ dangerCats:uni.getStorageSync('dangerCats')||[]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -85,9 +108,11 @@
|
|
if(!uni.getStorageSync('dangerCats')){
|
|
if(!uni.getStorageSync('dangerCats')){
|
|
industryApi.getByList().then((res)=>{
|
|
industryApi.getByList().then((res)=>{
|
|
uni.setStorageSync('entCats',res.data)
|
|
uni.setStorageSync('entCats',res.data)
|
|
|
|
+ this.entCats=res.data
|
|
})
|
|
})
|
|
dangerApi.getCatByList().then((res)=>{
|
|
dangerApi.getCatByList().then((res)=>{
|
|
uni.setStorageSync('dangerCats',res.data)
|
|
uni.setStorageSync('dangerCats',res.data)
|
|
|
|
+ this.dangerCats=res.data
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -102,6 +127,7 @@
|
|
keywords:this.keywords
|
|
keywords:this.keywords
|
|
}).then((res)=>{
|
|
}).then((res)=>{
|
|
this.items=this.items.concat(res.data)
|
|
this.items=this.items.concat(res.data)
|
|
|
|
+ this.total=res.total
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handle({type,item}){
|
|
handle({type,item}){
|
|
@@ -128,6 +154,9 @@
|
|
this.$refs.danger.show({type,item})
|
|
this.$refs.danger.show({type,item})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ showSuperVisor(item){
|
|
|
|
+ this.$refs.SupervisorList.show(item)
|
|
|
|
+ },
|
|
formatDangerLevel(val){
|
|
formatDangerLevel(val){
|
|
let dangerLevelOptions=['末知','重大','较大','一般','较小'];
|
|
let dangerLevelOptions=['末知','重大','较大','一般','较小'];
|
|
return dangerLevelOptions[val]
|
|
return dangerLevelOptions[val]
|
|
@@ -136,6 +165,9 @@
|
|
let status=['未整改','已整改'];
|
|
let status=['未整改','已整改'];
|
|
return status[val]
|
|
return status[val]
|
|
},
|
|
},
|
|
|
|
+ formatsupervisorGroupList(val){
|
|
|
|
+ return val.split(',')
|
|
|
|
+ },
|
|
resetFilter(){
|
|
resetFilter(){
|
|
this.page = 1
|
|
this.page = 1
|
|
this.limit = 10
|
|
this.limit = 10
|
|
@@ -144,7 +176,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
- if(this.total>this.size*this.page){
|
|
|
|
|
|
+ if(this.total>this.limit*this.page){
|
|
this.page++
|
|
this.page++
|
|
this.getData()
|
|
this.getData()
|
|
}
|
|
}
|
|
@@ -262,6 +294,15 @@
|
|
margin-left: 8rpx;
|
|
margin-left: 8rpx;
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
|
|
+ .supervisor{
|
|
|
|
+ width: 500rpx;
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+ .supervisor-item{
|
|
|
|
+ margin: 4rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|