|
@@ -3,65 +3,65 @@
|
|
|
<view style="height:98rpx"></view>
|
|
|
<view class="ding">
|
|
|
<scroll-view scroll-x class="bg-white nav text-center">
|
|
|
- <view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav" :key="index" @tap="tabSelect"
|
|
|
- :data-id="index">
|
|
|
+ <view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav"
|
|
|
+ :key="index" @tap="tabSelect" :data-id="index">
|
|
|
<view v-if="TabCur==index" class="cu-tag badge">
|
|
|
- <block class="cu-tag badge">{{TabCur? unporcessList.length:porcessedList.length}} </block>
|
|
|
+ <block class="cu-tag badge">{{TabCur? unporcessList.length:record_count}} </block>
|
|
|
</view>
|
|
|
{{item}}
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
+ </view>
|
|
|
<block v-if="TabCur==0">
|
|
|
<view class="processList">
|
|
|
- <view class="cu-list menu-avatar">
|
|
|
-
|
|
|
- <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
|
|
|
- <view class="cu-avatar lg" style="background-image:url(../../../static/process-icon.png);"></view>
|
|
|
- <view class="content">
|
|
|
- <view class="pro-title">
|
|
|
- <view class="cut">{{item.title}}</view>
|
|
|
- </view>
|
|
|
- <view class="pro-des ">
|
|
|
- <view class="text-cut">
|
|
|
- {{item.des}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="pro-date ">{{item.time}}</view>
|
|
|
+ <view class="cu-list menu-avatar">
|
|
|
+
|
|
|
+ <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
|
|
|
+ <view class="cu-avatar lg" style="background-image:url(../../../static/process-icon.png);">
|
|
|
+ </view>
|
|
|
+ <view class="content">
|
|
|
+ <view class="pro-title">
|
|
|
+ <view class="cut">{{item.artificial_code}}</view>
|
|
|
</view>
|
|
|
- <view class="action" style="z-index:99">
|
|
|
- <view class="unProcess" @tap="goUnprocessDetail(item.id)">未处理</view>
|
|
|
+ <view class="pro-des ">
|
|
|
+ <view class="text-cut">
|
|
|
+ {{item.content}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class=" text-center margin-top" v-if="unporcessList.length === 0">暂无数据...</view>
|
|
|
+ <view class="pro-date ">{{item.timestamp}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="action" style="z-index:99">
|
|
|
+ <view class="unProcess" @tap="goUnprocessDetail(item)">未处理</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <view class=" text-center margin-top" v-if="record_count === 0">暂无数据...</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </block>
|
|
|
-
|
|
|
+ </block>
|
|
|
+
|
|
|
<block v-if="TabCur==1">
|
|
|
<view class="processList">
|
|
|
- <view class="cu-list menu-avatar " >
|
|
|
- <view class="cu-item" v-for="(item,index) in porcessedList" :key="index">
|
|
|
- <view class="cu-avatar lg" style="background-image:url(../../../static/processed-icon.png);"></view>
|
|
|
- <view class="content">
|
|
|
- <view class="pro-title">
|
|
|
- <view class="cut">{{item.title}}</view>
|
|
|
- </view>
|
|
|
- <view class="pro-des ">
|
|
|
- <view class="text-cut">
|
|
|
- {{item.des}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="pro-date ">{{item.time}}</view>
|
|
|
+ <view class="cu-list menu-avatar ">
|
|
|
+ <view class="cu-item" v-for="(item,index) in porcessedList" :key="index">
|
|
|
+ <view class="cu-avatar lg" style="background-image:url(../../../static/processed-icon.png);">
|
|
|
+ </view>
|
|
|
+ <view class="content">
|
|
|
+ <view class="pro-title">
|
|
|
+ <view class="cut">{{item.artificial_code}}</view>
|
|
|
</view>
|
|
|
- <view class="action" style="z-index:99">
|
|
|
- <view class="processed" @tap="goProcessedDetail(item.id)">已处理</view>
|
|
|
+ <view class="pro-des ">
|
|
|
+ <view class="text-cut">
|
|
|
+ {{item.content}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="text-center margin-top" v-if="porcessedList.length === 0">暂无数据...</view>
|
|
|
+ <view class="pro-date ">{{item.timestamp}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="action" style="z-index:99">
|
|
|
+ <view class="processed" @tap="goProcessedDetail(item)">已处理</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <view class="text-center margin-top" v-if="record_count1 === 0">暂无数据...</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</block>
|
|
|
|
|
@@ -73,9 +73,9 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- unporcessList: json.inspectUnprocessList,
|
|
|
- porcessedList: json.inspectProcessedList,
|
|
|
-
|
|
|
+ unporcessList: [],
|
|
|
+ porcessedList: [],
|
|
|
+
|
|
|
type: '0',
|
|
|
modalName: null,
|
|
|
listTouchStart: 0,
|
|
@@ -83,71 +83,96 @@
|
|
|
CustomBar: this.CustomBar,
|
|
|
TabCur: 0,
|
|
|
tabNav: ['未处理', '已处理'],
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ record_count: '',
|
|
|
+ record_count1: ''
|
|
|
+
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- onNavigationBarButtonTap(e) {
|
|
|
- console.log(e)
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/export/export',
|
|
|
- success: res => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
- });
|
|
|
+ this.getProcessData({
|
|
|
+ "company_code": uni.getStorageSync('selectedCode'),
|
|
|
+ "clzt": 0
|
|
|
+ }, 0);
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ onNavigationBarButtonTap(e) {
|
|
|
+ console.log(e)
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/export/export',
|
|
|
+ success: res => {},
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
-
|
|
|
+ async getProcessData(params = {}, whichTab) {
|
|
|
+ const res = await this.$myRequest({
|
|
|
+ url: 'FireInspector/getManualInspectorList',
|
|
|
+ data: params,
|
|
|
+ showLoading: true
|
|
|
+ })
|
|
|
+ this.unporcessList = res.data.data;
|
|
|
+ console.log(this.unporcessList)
|
|
|
|
|
|
- tabSelect(e) {
|
|
|
|
|
|
- console.log(e.currentTarget);
|
|
|
- this.TabCur = e.currentTarget.dataset.id;
|
|
|
- this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
|
|
+ if (whichTab == 0) {
|
|
|
+ this.unporcessList = res.data.data;
|
|
|
+ this.record_count = parseInt(res.data.record_count)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.porcessedList = res.data.data;
|
|
|
+ this.record_count1 = parseInt(res.data.record_count)
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+ tabSelect(e) {
|
|
|
+ this.unporcessList = [],
|
|
|
+ this.porcessedList = [],
|
|
|
+ console.log(e.currentTarget);
|
|
|
+ this.TabCur = e.currentTarget.dataset.id;
|
|
|
+ this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
|
|
+
|
|
|
+ this.getProcessData({
|
|
|
+ "company_code": uni.getStorageSync('selectedCode'),
|
|
|
+ "clzt": e.currentTarget.dataset.id
|
|
|
+ }, this.TabCur);
|
|
|
},
|
|
|
|
|
|
// 页面跳转
|
|
|
- goUnprocessDetail(id) {
|
|
|
+ goUnprocessDetail(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/inspectList/unprocessDetail/unprocessDetail?id='+item.id,
|
|
|
+ success: res => {},
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ goProcessedDetail(item) {
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/inspectList/unprocessDetail/unprocessDetail',
|
|
|
+ url: '/pages/inspectList/processedDetail/processedDetail?id='+item.id,
|
|
|
success: res => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|
|
|
});
|
|
|
- },
|
|
|
-
|
|
|
- goProcessedDetail(id) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/inspectList/processedDetail/processedDetail',
|
|
|
- success: res => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- // goVideoUnprocessDetail(id) {
|
|
|
- // uni.navigateTo({
|
|
|
- // url: '/pages/unprocessDetail/unprocessDetail?companyCode=' + this.companyCode + '&processingStatus=0&id=' + id +
|
|
|
- // '&type=2',
|
|
|
- // success: res => {},
|
|
|
- // fail: () => {},
|
|
|
- // complete: () => {}
|
|
|
- // });
|
|
|
- // },
|
|
|
-
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
goVideoProcessedDetail(id) {
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode + '&processingStatus=' + this.processingStatus +
|
|
|
+ url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode +
|
|
|
+ '&processingStatus=' + this.processingStatus +
|
|
|
'&id=' + id + '&type=2',
|
|
|
success: res => {},
|
|
|
fail: () => {},
|
|
@@ -164,13 +189,16 @@
|
|
|
position: relative;
|
|
|
border-bottom: 8rpx solid;
|
|
|
}
|
|
|
+
|
|
|
.cu-tag.badge {
|
|
|
top: 14rpx;
|
|
|
right: 96rpx;
|
|
|
}
|
|
|
+
|
|
|
.nav .cu-item {
|
|
|
width: 50%;
|
|
|
margin: 0;
|
|
|
+
|
|
|
.text-blue,
|
|
|
.line-blue,
|
|
|
.lines-blue {
|