Browse Source

工厂详情

devlop
mo-bai 3 years ago
parent
commit
64c2959c6e
3 changed files with 20 additions and 7 deletions
  1. 8
      pages/device-info/index.vue
  2. 11
      pages/factory-info/index.vue
  3. 8
      pages/production-info/index.vue

8
pages/device-info/index.vue

@ -20,7 +20,7 @@
</text>
</view>
</view>
<view class="flex-row section_2">
<view class="flex-row section_2" v-if="operation == 'edit'">
<view class="flex-col items-center text-wrapper_1" @click="deleteDevice">
<text>删除</text>
</view>
@ -40,13 +40,17 @@ export default {
return {
info: { imgItemList: [] },
id: null,
swiperCurrent: 0
swiperCurrent: 0,
operation: 'edit'
}
},
onLoad(options) {
if (options.id) {
this.id = options.id
}
if (options.operation) {
this.operation = options.operation
}
},
onShow() {
if (this.id) {

11
pages/factory-info/index.vue

@ -53,7 +53,7 @@
</view>
</view>
<view v-if="curTab == 'device'">
<view class="flex-col section_3" v-for="(item, index) in deviceList" :key="index" @click="go2('device-info', { id: item.id })">
<view class="flex-col section_3" v-for="(item, index) in deviceList" :key="index" @click="go2('device-info', { id: item.id, operation: 'info' })">
<image mode="aspectFit" @click.stop="preview(item)" :src="item.imgItemList[0].url" class="image_5" />
<view class="flex-col">
<view class="justify-between group_13">
@ -67,7 +67,12 @@
</view>
<view v-if="curTab == 'production'">
<view class="grid">
<view class="flex-col grid-item" v-for="production in productionList" :key="production.id" @click="go2('production-info', { id: production.id })">
<view
class="flex-col grid-item"
v-for="production in productionList"
:key="production.id"
@click="go2('production-info', { id: production.id, operation: 'info' })"
>
<text>{{ production.name }}</text>
<image mode="aspectFit" :src="production.imgItemList[0].url" class="image_7" />
</view>
@ -78,7 +83,7 @@
<view class="group_13">
<text class="text_8">{{ item.name }}</text>
</view>
<image mode="aspectFit" @click.stop="preview(item)" :src="item.pictureUrl" class="image_5" />
<image mode="aspectFit" :src="item.pictureUrl" class="image_5" />
</view>
</view>
<view class="observer">{{ hasMore ? '加载中~' : '没有更多~' }}</view>

8
pages/production-info/index.vue

@ -20,7 +20,7 @@
</text>
</view>
</view>
<view class="flex-row section_2">
<view class="flex-row section_2" v-if="operation == 'edit'">
<view class="flex-col items-center text-wrapper_1" @click="deleteProduction">
<text>删除</text>
</view>
@ -40,13 +40,17 @@ export default {
return {
info: { imgItemList: [] },
id: null,
swiperCurrent: 0
swiperCurrent: 0,
operation: 'edit'
}
},
onLoad(options) {
if (options.id) {
this.id = options.id
}
if (options.operation) {
this.operation = options.operation
}
},
onShow() {
if (this.id) {

Loading…
Cancel
Save