|
@@ -60,7 +60,7 @@
|
|
|
|
|
|
<view class="tag-banner" style="">
|
|
|
<view class="tag-banner" v-for="(tag,index) in item.imgname" :key="index" v-if="item.imgname.length>0">
|
|
|
- <text class="img-banner" v-if="item.imgname[index]" @click="closeTag(index)">{{tag}}</text>
|
|
|
+ <text class="img-banner" v-if="item.imgname[index]!=''&& closeTags[index]" @click="closeTag(index)">{{tag}}</text>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -107,7 +107,7 @@
|
|
|
var maxcount = 5
|
|
|
var current = ref(1)
|
|
|
var records = ref<Record[]>([]);
|
|
|
- //var closeTags = ref<boolean[]>([]);
|
|
|
+ const closeTags = ref<boolean[]>([]);
|
|
|
var initRecords = [] as Record[]
|
|
|
|
|
|
onLoad((options) => {
|
|
@@ -115,7 +115,11 @@
|
|
|
const num = options?.num ?? "1"
|
|
|
const pid = options?.pid ?? "1"
|
|
|
maxcount = parseInt(num)
|
|
|
- //closeTags.value = Array<boolean>(maxcount).fill(true);
|
|
|
+ //var closeTags = new Array(maxcount as Int).fill(true)
|
|
|
+ //closeTags.value = Arrays.fill(true)
|
|
|
+
|
|
|
+ console.log(closeTags.value)
|
|
|
+
|
|
|
// #ifdef APP-ANDROID
|
|
|
getList('app_media_record', 'photoitem', photoitem, 'pid', pid, null).then((res : UTSJSONObject) => {
|
|
|
let dataList = res?.['data'] as UTSJSONObject[] ?? Array<UTSJSONObject>()
|
|
@@ -130,6 +134,9 @@
|
|
|
item['urlpdt'] = urlpdtArr
|
|
|
let record = JSON.parse<Record>(item.toJSONString());
|
|
|
if (record != null) {
|
|
|
+ for(let i:Int=0;i<record.num; i++){
|
|
|
+ closeTags.value.push(true)
|
|
|
+ }
|
|
|
initRecords.push(record)
|
|
|
}
|
|
|
}
|
|
@@ -183,7 +190,17 @@
|
|
|
current.value = obj
|
|
|
records.value = initRecords.filter(item => item['senum'] == current.value)
|
|
|
}
|
|
|
- const closeTag = (index : number) => {
|
|
|
+ const closeTag = (index : number) => {
|
|
|
+ let record = records.value[0]
|
|
|
+ if(record.status==3){
|
|
|
+ uni.showToast({
|
|
|
+ title: '拍照任务已完成',
|
|
|
+ icon: 'error',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
uni.showModal({
|
|
|
title: '系统提示',
|
|
|
content: '确认是否删除图片',
|
|
@@ -191,8 +208,7 @@
|
|
|
confirmText: '确定',
|
|
|
success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
- //closeTags.value[index] = false
|
|
|
- let record = records.value[0]
|
|
|
+ closeTags.value[index] = false
|
|
|
let imgname = record.imgname.filter((img,i)=> i!= index)
|
|
|
let urlpdt = record.urlpdt.filter((url,i)=> i!= index)
|
|
|
let updatedData = ''
|